Commit graph

11665 commits

Author SHA1 Message Date
bors 0bbfc5e536 Auto merge of #10191 - weihanglo:issue-9881, r=alexcrichton
Improve I/O error message for fingerprint of build script

It is a bit rough but I don't think there is a network I/O error
in `pkg_fingerprint`. Checking only `io::Error` type should be fine.

Resolves #9881
2021-12-13 21:09:58 +00:00
bors 1ee19f3403 Auto merge of #10177 - ehuss:list-alias, r=alexcrichton
Explicitly mark aliases in `cargo list`.

This I think makes it a little clearer that these are aliases, and matches the form used for built-in aliases.
2021-12-13 20:26:34 +00:00
bors a4cdd757e5 Auto merge of #10171 - ehuss:no-executable-doc, r=alexcrichton
Don't emit "executable" JSON field for non-executables.

The "executable" field of JSON artifact messages was accidentally filled (with the path to `index.html`) when documenting a binary target. This fixes it so that it is null.

Closes #10149
2021-12-13 19:48:00 +00:00
bors dadeae842c Auto merge of #10166 - ehuss:scrape-examples-unstable-doc, r=alexcrichton
Move scrape-examples docs to correct section.

This was erroneously put in the stabilized section.
2021-12-13 19:10:44 +00:00
bors c7db2995d0 Auto merge of #10161 - weihanglo:issue-7473, r=alexcrichton
Do not suggest source config if nothing to vendor

fixes #7473

Also remove the empty vendor dir if we've just created it but didn't vendor anything.
2021-12-13 18:26:26 +00:00
bors 599961b320 Auto merge of #10155 - ehuss:bump-deps, r=alexcrichton
Bump versions of local deps.

There have only been very minor changes since the last version.
2021-12-13 17:47:44 +00:00
bors 5d7ac5897d Auto merge of #10154 - ehuss:version-bump, r=alexcrichton
Bump to 0.60.0, update changelog
2021-12-13 17:00:36 +00:00
bors 85d146239d Auto merge of #10153 - ehuss:fix-profile-docs, r=alexcrichton
Fix some profile documentation.

The `test` and `bench` sections had wrong information about which profile is used.  This also has some changes to try to format and clarify selection a little.
2021-12-13 16:16:58 +00:00
bors 3aaa8f975d Auto merge of #10172 - ehuss:doc-lib-before-bin, r=alexcrichton
Document lib before bin.

This changes it so that documenting a library is required to finish before documenting a binary. The issue is that the binary may have intra-doc links to the library. If they are documented concurrently, then the links will sometimes fail (since it is a race).   Or, if doing `cargo doc --bins`, then the library docs wouldn't exist at all.

Note that in the tests this introduces some more name collisions if you just run `cargo doc --bins` and there is a colliding library/binary name. There is some risk that someone might be trying to run the commands separately to get around the collision error, but I think it is unlikely.
2021-12-13 15:38:31 +00:00
bors fe69af39d8 Auto merge of #10178 - ehuss:version-from-rustc, r=alexcrichton
Sync cargo-the-cli version with rustc.

People occasionally get confused when cargo's version does not match the version of rustc. This happens in a variety of scenarios:
* Point releases.
* Beta releases (cargo is missing the .1 .2, etc.)
* Nightly releases when cargo's version has not yet been bumped.

This changes it so that cargo-the-cli will always report the same version as rustc (assuming they were built with rustbuild). The git information remains the same (reports cargo's last commit sha).

Closes #10122
2021-12-13 15:02:00 +00:00
Weihang Lo 760ff62f36
Improve I/O error message for fingerprint of build script
It is a bit rough but I don't think there is a network I/O error
in `pkg_fingerprint`. Checking only `io::Error` type should be fine.
2021-12-11 08:31:24 +08:00
bors 6d75259be9 Auto merge of #10185 - Aaron1011:future-incompat-cleanup, r=ehuss
Remove `-Z future-incompat-report` from message displayed to user

This was missed during stabilization
2021-12-10 01:18:08 +00:00
Aaron Hill 2a43df61b2
Remove -Z future-incompat-report from message displayed to user
This was missed during stabilization
2021-12-09 12:27:23 -06:00
Eric Huss a58725ad00 Use version from rustbuild. 2021-12-06 17:46:46 -08:00
Eric Huss f5cb79e85b Remove pre_release in version info.
This field is no longer being used, as pre-release versions have
not been used in cargo for quite some time, and I don't anticipate
them ever returning.
2021-12-06 15:19:01 -08:00
Eric Huss 67581052d8 Move cargo's self-version code to a dedicated module. 2021-12-06 14:59:28 -08:00
Eric Huss 910569aac3 Explicitly mark aliases in cargo list. 2021-12-06 14:02:21 -08:00
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
Eric Huss 6079746278 Move scrape-examples docs to correct section.
This was erroneously put in the stabilized section.
2021-12-06 12:55:13 -08: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
Eric Huss 6a79008cad Don't emit "executable" JSON field for non-executables. 2021-12-05 18:39:30 -08:00
Eric Huss a09fbf2ef8 Document lib before bin. 2021-12-05 15:14:54 -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
Weihang Lo 8a8d39a459
Do not suggest source config if nothing to vendor 2021-12-05 00:10:09 +08: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
Eric Huss 1ddf453a88 Fix some profile documentation. 2021-12-03 13:48:28 -08:00
Eric Huss 06bffb59a7 Bump versions of local deps. 2021-12-03 11:05:03 -08:00
Eric Huss f682131a1f Update changelog for 1.58 2021-12-03 10:49:10 -08:00
Eric Huss c52f8e2b3b Bump to 0.60.0 2021-12-03 10:21:10 -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