Commit graph

11640 commits

Author SHA1 Message Date
bors 40dc281755 Auto merge of #10168 - hi-rustin:rustin-patch-flag, r=ehuss
Unify the description of quiet flag

cc: #8928
I seem to have missed it.
2021-12-06 21:54:44 +00:00
bors 263b1690c2 Auto merge of #10165 - Aaron1011:stabilize-future-incompat, r=ehuss
Stabilize future-incompat-report

Depends on https://github.com/rust-lang/rust/pull/91535
2021-12-06 18:47:39 +00:00
Aaron Hill 673b15d5e6
Add CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY to environment variables 2021-12-06 12:01:07 -06:00
Aaron Hill 4fcf5ca6a4
Adjust [future-incompat-report] docs 2021-12-06 11:57:00 -06:00
Aaron Hill a717196b2b
Improve documentation and add [future-incompat-report] config section 2021-12-06 10:41:25 -06:00
Aaron Hill 365cae37b7
Fix detection of --json future-incompat 2021-12-06 10:29:17 -06:00
hi-rustin a3e3ff99c9 Add arg_quiet
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-12-06 19:12:07 +08:00
hi-rustin d45c9baac0 Unify the description of quiet flag
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-12-06 19:12:07 +08:00
Aaron Hill 8c7c35ec47
Update docs 2021-12-05 14:09:07 -06:00
bors cf474a5de7 Auto merge of #10133 - joshtriplett:release-short, r=ehuss
Support abbreviating `--release` as `-r`

Of the options people regularly pass to cargo, `--release` seems by far
the most common. Yet even on the command line, we expect people to type
out `--release`.

Add a short version `-r`, and add some tests in the testsuite that
confirm it works.
2021-12-05 19:44:23 +00:00
Aaron Hill c2332dc0ba
Detect if rustc supports '--json future-incompat' 2021-12-05 13:27:57 -06:00
Aaron Hill 997bf3fffc
Stabilize future-incompat-report
Depends on https://github.com/rust-lang/rust/pull/91535
2021-12-05 14:14:32 -05:00
bors f9089fc5be Auto merge of #10158 - matklad:depodoc, r=ehuss
doc: nudge towards simple version requirements

Cargo is very ingeniously designed such that the simplest thing you can do when sepcifying a dependency, `time = "1.2.3"`, is also the best thing you can do. However, new Rust folks often overthink this, and use more verbose syntaxes, which at best is unnecessary, and and at worst creates pains downstream. For example, https://github.com/elastic/elasticsearch-rs/blob/master/elasticsearch/Cargo.toml contains a mistrue of default, `~` and `^` requirements, which lets the reader wondering what's going on.

Let's try to help the situation by focusing on default requirements in the docs
2021-12-05 16:00:35 +00:00
Aleksey Kladov ec3909e254 doc: fix some stale URLs 2021-12-05 14:47:03 +03:00
Aleksey Kladov 7039064d5b doc: nudge towards simple version requirements 2021-12-05 14:47:01 +03:00
bors 0507d9f5ce Auto merge of #10164 - weihanglo:issue-10131, r=ehuss
Upgrade clap to 2.34.0

That includes the fix of preventing panicking on a broken pipe.
accf3d2511

Fixes #10131
2021-12-04 18:41:25 +00:00
Weihang Lo cc267c7a72
Upgrade clap to 2.34.0
That includes the fix of preventing panicking on a broken pipe.
accf3d2511
2021-12-05 01:33:38 +08:00
bors d38f20d5b9 Auto merge of #10157 - luqmana:opnotsupp, r=ehuss
Treat EOPNOTSUPP the same as ENOTSUP when ignoring failed flock calls.

On some platforms, `ENOTSUP` and `EOPNOTSUPP` are distinct and it's not consistent which error is returned. e.g. the BSDs will return `EOPNOTSUPP` ([FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=flock&sektion=2#ERRORS), [OpenBSD](https://man.openbsd.org/flock.2#ERRORS)) whereas [macOS](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/flock.2.html) returns `ENOTSUP`.
2021-12-04 16:25:23 +00:00
Aleksey Kladov 7aa646d56e
Update src/doc/src/reference/specifying-dependencies.md
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2021-12-04 19:02:58 +03:00
Aleksey Kladov 519aaa85d7 doc: nudge towards simple version requirements 2021-12-04 11:01:01 +03:00
Josh Triplett c92d917f31 Update documentation for the -r short option for --release 2021-12-03 22:39:24 -08:00
Luqman Aden 6963df3b94 Treat EOPNOTSUPP the same as ENOTSUP when ignoring failed flock calls. 2021-12-01 14:29:01 -08:00
bors 451a0430c9 Auto merge of #10141 - ehuss:note-rustflags-removal, r=alexcrichton
Add note about RUSTFLAGS removal from build scripts.

The RUSTFLAGS environment variable was removed from build scripts in #9601, but the release notes did not make a note of this change. This adds a highlight to this potentially breaking change.
2021-11-30 17:47:34 +00:00
Eric Huss cfee33e8b0 Add note about RUSTFLAGS removal from build scripts. 2021-11-30 09:33:59 -08:00
bors 2ad6cb7f5d Auto merge of #10139 - hi-rustin:rustin-patch-clippy, r=Eh2406
Make clippy happy

This expression borrows a reference (`&core::registry::PackageRegistry`) that is immediately dereferenced by the compiler.
2021-11-30 15:01:06 +00:00
hi-rustin de5efea8b6 Make clippy happy
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-30 21:26:56 +08:00
bors 294967c53f Auto merge of #10137 - ehuss:lto-pdb-collision-test, r=alexcrichton
Fix some tests with output collisions.

This fixes some tests which run afoul of creating colliding outputs (tracked in #6313). In particular, these tests are creating duplicate pdb files on Windows because they have a binary and a library (dylib) with the same name. This is causing significant issues on rust-lang's CI (https://github.com/rust-lang/rust/issues/81890) where the MSVC linker is failing with a mysterious LNK1201 error. Presumably two LINK.exe processes are trying to write to the same PDB file at the same time, which causes it to fail.

Ideally this shouldn't happen, but I don't really have any ideas on how to resolve it, as the name of the PDB has some importance.

I have not been able to reproduce the LNK1201 error. My hope is that this change will help alleviate the issue, though.

I updated the `doc_all_member_dependency_same_name` test to illustrate that it is hitting a collision, which is a fundamental part of that test (and something we should probably figure out how to resolve in the future).
2021-11-29 19:04:22 +00:00
Eric Huss 2507d53bb6 Fix some tests with output collisions. 2021-11-29 11:04:08 -08:00
bors 26105a45e9 Auto merge of #10109 - hi-rustin:rustin-patch-docs-profile, r=ehuss
Description of the targets that can be applied

close https://github.com/rust-lang/cargo/issues/9806

Adds a description of the targets to which the default profile can be applied.
2021-11-29 18:27:56 +00:00
bors c5fddb0f56 Auto merge of #10130 - weihanglo:issue-8690, r=alexcrichton
Improve unused patch message when source URLs mismatched

Resolves #8690

`Resolve.unused_patches` does not contains info about which source
URLs they are going to patch. As a result, we cannot provide a precise
message but only list all possible URLs of the packages with the same
name in the resolved graph.

There is a little flaw that if multiple patches are patching the same
package, the source URL of the used one would be shown as a possible
URL in the warning.
2021-11-29 16:29:46 +00:00
bors 533512008a Auto merge of #10132 - ehuss:doctest-xcompile-note, r=alexcrichton
Add a note about doctest xcompile.

This adds a note when running with `--verbose` if doctests are being skipped because they do not support cross-compiling.

I decided to use verbose instead of always displaying it because I felt it could get really noisy.  However, I'm a bit on the fence.  I'm kinda curious what is blocking doctest-xcompile from being stabilized?
2021-11-29 15:48:33 +00:00
Josh Triplett 2f53ca2df1 Support abbreviating --release as -r
Of the options people regularly pass to cargo, `--release` seems by far
the most common. Yet even on the command line, we expect people to type
out `--release`.

Add a short version `-r`, and add some tests in the testsuite that
confirm it works.
2021-11-28 20:25:57 -08:00
Eric Huss ca3356a25c Add a note about doctest xcompile. 2021-11-28 17:32:11 -08:00
bors 8032ac5ef0 Auto merge of #10124 - matklad:edit-template-url, r=ehuss
book: add edit links to specific pages
2021-11-28 17:03:18 +00:00
Aleksey Kladov 3028bbac25 book: add edit links to specific pages 2021-11-28 11:41:17 +03:00
hi-rustin c066a2384f Description of the targets that can be applied
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-28 14:00:05 +08:00
Weihang Lo 91791c4fb1
Improve unused patch message when source URLs mismatched
`Resolve.unused_patches` does not contains info about which source
URLs they are going to patch. As a result, we cannot provide a precise
message but only list all possible URLs of the packages with the same
name in the resolved graph.

There is a little flaw that if multiple patches are patching the same
package, the source URL of the used one would be shown as a possible
URL in the warning.
2021-11-28 09:20:06 +08:00
bors b85ad15963 Auto merge of #10093 - hi-rustin:rustin-patch-rustc, r=ehuss
Add crate type flag to rustc command

part of https://github.com/rust-lang/cargo/issues/10083

- Add crate type flag to rustc command
- Add tests
- Update docs
2021-11-26 15:30:19 +00:00
bors 7f08ace4f1 Auto merge of #10117 - estebank:update-test-for-emoji, r=ehuss
Change test to not trigger emoji error

This change is needed to land rust-lang/rust#88781, as it changes the
handling of emojis in source code to treat them as identifiers.
2021-11-24 17:54:39 +00:00
Esteban Kuber 0dfe70f7e1 Change test to not trigger emoji error
This change is needed to land rust-lang/rust#88781, as it changes the
handling of emojis in source code to treat them as identifiers.
2021-11-24 17:07:40 +00:00
hi-rustin 137f9bc3d1 Add crate-type unstable doc
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-23 23:21:39 +08:00
hi-rustin 660ce6bba4 Add tests
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-23 22:58:18 +08:00
bors e1fb17631e Auto merge of #10110 - hi-rustin:rustin-patch-build-test, r=alexcrichton
re-enable lto_build test on 32-bit MSVC

re-enable lto_build test on 32-bit MSVC. Because https://github.com/rust-lang/rust/pull/27224 landed.
2021-11-22 16:53:06 +00:00
bors a2c6ec7522 Auto merge of #10103 - ehuss:tree-cycle, r=alexcrichton
Fix a couple issues with cyclic features and dev-dependencies

This fixes two issues with cyclic features and dev-dependencies:

* `cargo tree` would enter an infinite loop for cyclic features.
* The resolver would return a confusing error if a cyclic dev-dependency attempted to enable a feature on its parent that resulted in a cycle.  This fixes it to resolve correctly.

Fixes #10101
2021-11-22 16:18:31 +00:00
hi-rustin a22a68e937 re-enabled lto_build test on 32-bit MSVC
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-22 22:12:48 +08:00
bors df8cda0a12 Auto merge of #10107 - hi-rustin:rustin-patch-install, r=ehuss
Add --message-format for install command

close https://github.com/rust-lang/cargo/issues/10104
2021-11-21 16:13:58 +00:00
bors 934bc6143e Auto merge of #10106 - russweas:master, r=ehuss
Update curl dependency, remove M1 macOS build error note

Curl subversion 41 includes a workaround for the m1 macOS build error.
See https://github.com/rust-lang/rust/issues/90342#issuecomment-974698158
2021-11-21 15:31:50 +00:00
bors fa107dda36 Auto merge of #10105 - hi-rustin:rustin-patch-clippy, r=ehuss
Make clippy happy

Make clippy happy. Remove redundant clone.
2021-11-21 14:45:20 +00:00
hi-rustin 0c5f348bc2 Add crate type flag to rustc command
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-21 12:31:00 +08:00
hi-rustin 890b0e888b Update install doc
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-11-21 12:22:02 +08:00