11239 Commits

Author SHA1 Message Date
Eric Huss
70a607eaa7 Remove nbsp characters. 2021-07-30 15:40:37 -07:00
bors
77d5647213 Auto merge of #9750 - ehuss:update-unstable-toc, r=alexcrichton
Update unstable documentation TOC.

The unstable table of contents was slightly out-of-sync with recent changes.
2021-07-30 21:06:57 +00:00
bors
cd253b0359 Auto merge of #9749 - ehuss:no_all-package, r=alexcrichton
Some minor updates for package/publish package selection.

This is just a few small things I missed in the review of #9559.

* Don't include the deprecated `--all` flag in `cargo package`.
* Update the man pages for the new flags.
2021-07-30 20:37:29 +00:00
Eric Huss
a8be20a8c1 Update unstable documentation TOC. 2021-07-30 13:22:34 -07:00
Eric Huss
8e6f7ec5e6 Update package/publish man pages for package selection. 2021-07-30 13:09:14 -07:00
Eric Huss
8306410c1b Remove duplicated code in arg_package_spec. 2021-07-30 13:05:17 -07:00
Eric Huss
cafc0002e7 Remove --all from cargo package. 2021-07-30 12:59:35 -07:00
bors
8b0671add3 Auto merge of #9748 - ehuss:version-bump, r=alexcrichton
Bump to 0.57.0, update changelog
2021-07-30 15:35:18 +00:00
Eric Huss
570107f824 Update changelog for 1.55 2021-07-30 08:24:21 -07:00
bors
9225ac7897 Auto merge of #9411 - joshtriplett:stabilize-configurable-env, r=alexcrichton
Stabilize `[env]` sections

`[env]` sections seem to work as advertised.
2021-07-30 15:01:55 +00:00
Eric Huss
5578567277 Bump to 0.57.0 2021-07-30 07:24:53 -07:00
Josh Triplett
323265db19 Add reference from unstable doc anchor to stable env documentation 2021-07-29 19:55:21 -07:00
Josh Triplett
ab38ce0f44 Stabilize [env] sections
`[env]` sections seem to work as advertised.
2021-07-29 19:50:51 -07:00
bors
0a24beb34e Auto merge of #9747 - lf-:document-pathandargs-doc-browser, r=ehuss
doc: Clarify [doc].browser docs, document PathAndArgs better

I was talking to someone who was confused about the [doc].browser value type as it related to using a path with a space in it, and it seemed like this area needed clarification in general.
2021-07-29 21:58:18 +00:00
Jade
1c44404ecd Clarify [doc].browser docs, document PathAndArgs better 2021-07-29 14:50:34 -07:00
bors
97641b17dc Auto merge of #9745 - ehuss:cargo-util-version, r=alexcrichton
Bump cargo-util version.

I neglected to bump the version when moving some APIs over to this crate.

cc #9744
2021-07-29 16:57:14 +00:00
Eric Huss
4fbf61da10 Bump cargo-util version. 2021-07-29 09:23:23 -07:00
bors
bf505afa92 Auto merge of #9736 - hi-rustin:rustin-patch-clippy, r=ehuss
Make clippy happy

Make clippy happy.
2021-07-28 15:41:09 +00:00
bors
ee267ee9ba Auto merge of #9737 - ods:doc/features_typo, r=alexcrichton
Fix typo in features doc
2021-07-28 14:05:21 +00:00
ods
3c4ddb6a1a Fix typo in features doc 2021-07-28 16:20:44 +03:00
hi-rustin
91f0648899 Make clippy happy
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-07-28 14:59:43 +08:00
bors
cdf22d19c9 Auto merge of #9730 - hi-rustin:rustin-patch-doc-test, r=alexcrichton
doc test supports silent output

close https://github.com/rust-lang/cargo/issues/9728
2021-07-27 15:05:14 +00:00
hi-rustin
8ee5433c3a doc test supports silent output
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-07-27 15:49:59 +08:00
bors
d21c22870e Auto merge of #9727 - ehuss:fix-version, r=alexcrichton
Fix version string.

The version string for `cargo version` was inadvertently changed in #9657 so that it does not include the leading `cargo` as in `cargo 1.53.0 (4369396ce 2021-04-27)`.
2021-07-26 20:23:21 +00:00
bors
9bc7a37533 Auto merge of #9559 - tcmal:master, r=ehuss
Allow publishing from workspace root.

Adds -p, --workspace, and --exclude to package and publish commands.

Uses ephemeral workspaces to avoid changing the existing functions too much.
There might be more `Finished dev [unoptimized + debuginfo] target` messages when packaging than there should be, I couldn't figure out what was generating them.
The tests aren't super extensive, as all the specs from arguments code should already be tested elsewhere.

Closes #7345
2021-07-26 19:58:01 +00:00
Eric Huss
30ff8424c9 Remove unnecessary format! 2021-07-26 12:56:53 -07:00
bors
d403db6f17 Auto merge of #9723 - hi-rustin:rustin-patch-better-msg, r=ehuss
Better msg for wrong position

close https://github.com/rust-lang/cargo/issues/9717
2021-07-26 19:24:32 +00:00
Eric Huss
fdc398e743 Fix version string. 2021-07-26 12:18:22 -07:00
bors
97007c99a5 Auto merge of #9557 - danielframpton:extra-link-args, r=ehuss
Stabilize the rustc-link-arg option

This change removes the unstable option (tracked by #9426) and unconditionally accepts additional linker arguments (as implemented in #7811 and #8441). Documentation is moved from unstable to what appeared to be the correct location.

I am not aware of any significant concerns with the option and it appears consistent with some other existing stable linker options.

Please let me know if this is not the appropriate process or if there is anything that I am missing from the PR.
2021-07-26 18:54:29 +00:00
tcmal
8f1f0e40fd feat(package+publish): package arguments
adds -p, --workspace, and --exclude to package command,
and -p to publish command, as well as tests for both.

closes #7345
2021-07-26 16:31:58 +01:00
hi-rustin
5ccb5a3f92 Refine name
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-07-25 00:35:09 +08:00
hi-rustin
10cfa40669 Better msg for wrong position
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-07-24 10:44:44 +08:00
bors
9535dc3dfd Auto merge of #9681 - hi-rustin:rustin-patch-reject, r=ehuss
Warning when using features in replace

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

r? `@ehuss`
2021-07-23 18:53:25 +00:00
bors
e6976ec18c Auto merge of #9721 - In-line:refactor-if-let-chains, r=ehuss
Refactor if let chains to matches! macro
2021-07-23 18:29:49 +00:00
Alik Aslanyan
c212a5c376
Refactor if let chains to matches! macro 2021-07-23 18:53:09 +04:00
bors
37d9fdb56f Auto merge of #9720 - In-line:weather-is-not-nice-today, r=ehuss
Weather is not nice today..
2021-07-23 13:37:24 +00:00
Alik Aslanyan
8ee76f6082
Weather is not nice today.. 2021-07-23 17:15:14 +04:00
hi-rustin
771356d821 Warning when using features in replace
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2021-07-23 15:00:50 +08:00
Daniel Frampton
e73703944e Stabilize the extra link arg option 2021-07-22 09:57:00 -07:00
bors
121f4b3b5c Auto merge of #9653 - bjorn3:update_should_use_metadata, r=alexcrichton
Update should_use_metadata function

* Correct the reason for not renaming dylibs
* Add todo for -install-name/-soname usage
* Limit wasm32 executable metadata omission to emscripten. Wasm file don't contain any filename themself.
* Don't omit metadata for executables on macOS. backtrace-rs is now able to load debuginfo for renamed .dSYM files: ed3689c2f2/src/symbolize/gimli/macho.rs (L51-L65)
* Mention another reason to include the metadata hash for libstd.
2021-07-22 14:16:04 +00:00
bors
cebef2951e Auto merge of #9714 - PTNobel:fix-force-warn, r=ehuss
Changes rustc argument from `--force-warns` to `--force-warn`

The rustc argument was renamed in rust-lang/rust#87346 breaking `cargo fix` on the nightly toolchain.

I encountered this while attempting to test Edition 2021 migrations.

I ran `RUSTC=/path/to/nightly/rustc cargo test` and encountered a few failing tests, but none of them seemed at all related to the 1 line I changed, so if they crop up in CI as well, would love some help on identifying what's causing that.

Closes rust-lang/rust#87360
2021-07-22 13:01:52 +00:00
Parth Nobel
3dc2018c40 Changes rustc argument from --force-warns to --force-warn
The rustc argument was renamed in rust-lang/rust#87346.
2021-07-21 23:44:24 -07:00
bors
706c291051 Auto merge of #9632 - weihanglo:issue-6691, r=ehuss
Display registry name instead of registry URL when possible

Fixes #6691

This PR can be divided into several parts:

- c5be3de: Try to display registry names instead of URLs for `impl Dipslay for SourceId`. This benefits almost all kinds of messages using`SourceId` directly or indrectly.
- 9394d48: This fixes `Updating <name> index` part of `[source]` replacement, which previously didn't preserve the registry name information.
- 4c2f9b5: This makes its best effort to show registry names for deps from `Cargo.lock`. Since current lockfile format does not serialize any registry name. We here try the best effort to restore registry name from either `[registries]` table or `[source]` replacement table. This is done by manually implementing `Hash` and `PartialEq` for `SourceIdInner`, of which two traits previously are simply derived.
    To make `SourceIdInner` generate the same hash no matter it contains `name` field or not, here we remove `name` field from hashing and only concern about `kind`, `precise` and `canonical_url`.

Feel free to ask me for adding more tests, though I am not sure what tests should be added 😅
2021-07-21 17:14:20 +00:00
Weihang Lo
8c75e2ffa0
Update tests to use registry names 2021-07-22 00:50:30 +08:00
Weihang Lo
4efaa4e6c6
Use crates-io instead of crates.io as registry name 2021-07-22 00:18:46 +08:00
Weihang Lo
7720662630
Show registry name for SourceId from lockfile
Since current lockfile does not serialize any registry names. We here
try best effort to restore registry name from either `[registries]`
table or `[source]` replacement table. This is done by manually
implementing `Hash` and `PartialEq` for `SourceIdInner`, of which two
traits previously are simply `derive`d.

To make `SourceIdInner` generate the same hash whether contains `name`
field or not, here we remove `name` field from hashing and only concern
about `kind`, `precise` and `canonical_url`.
2021-07-22 00:18:46 +08:00
Weihang Lo
b8ddbd2387
Show registry name when using source replacment 2021-07-22 00:18:46 +08:00
Weihang Lo
71f5e92311
Show registry name in messages if possible
This fixes most messages to display registry names instead of URLs.
2021-07-22 00:18:46 +08:00
Weihang Lo
9244a42d52
Reuse crate-io constant 2021-07-22 00:18:45 +08:00
bors
4e143fd131 Auto merge of #9685 - ehuss:named-profile-updates, r=alexcrichton
Named profile updates

A few updates for named profiles to push them closer to stabilization:

- Disable the `dir-name` profile setting. `dir-name` primarily exists for translating the built-in profiles or sharing artifacts between profiles. In order to simplify the UI, we would like to not expose it to the user for the initial stabilization. The code to support it is kept in case we want to add it in the future.
- Reserve some profile names. Just to give a little flexibility in the future in case we want to use these, or that they could cause confusion. Also updated the error text a little.
- Add support for custom profiles to legacy commands. Their old behavior is still retained for backwards compatibility. That is:
    * `cargo check`
        * `--profile=test`: This forces the test mode. For example, `cargo check --lib --profile=test` will check the library as a unit test (with `--test`).
    * `cargo fix`
        * `--profile=test`: Forces test mode, same as above.
    * `cargo rustc`
        * `--profile=test`: Forces test mode, same as above.
        * `--profile=bench`: Forces bench mode.
        * `--profile=check`: Forces check mode.
    - These commands also allow mixing the above options with `--release`, which is normally not allowed.
- Fix `cargo bench` to support the `--profile` option. I think it was just forgotten.
2021-07-20 21:55:45 +00:00