Skip to content

Commit b28b667

Browse files
authored
Merge branch 'master' into issue-10477
2 parents c1b90b9 + 3ccf7dc commit b28b667

File tree

1,337 files changed

+20560
-5255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,337 files changed

+20560
-5255
lines changed

.github/workflows/contrib.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ on:
44
branches:
55
- master
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
deploy:
12+
permissions:
13+
contents: write # for Git to git push
914
runs-on: ubuntu-latest
1015
steps:
11-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1217
with:
1318
fetch-depth: 0
1419
- name: Install mdbook

.github/workflows/main.yml

+28-5
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ defaults:
99
run:
1010
shell: bash
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
# Check Code style quickly by running `rustfmt` over all code
1417
rustfmt:
1518
runs-on: ubuntu-latest
1619
steps:
17-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
1821
- run: rustup update stable && rustup default stable
1922
- run: rustup component add rustfmt
2023
- run: cargo fmt --all --check
@@ -53,7 +56,9 @@ jobs:
5356
rust: nightly-gnu
5457
other: i686-pc-windows-gnu
5558
steps:
56-
- uses: actions/checkout@v2
59+
- uses: actions/checkout@v3
60+
- name: Dump Environment
61+
run: ci/dump-environment.sh
5762
- name: Update Rustup (temporary workaround)
5863
run: rustup self update
5964
shell: bash
@@ -68,6 +73,13 @@ jobs:
6873

6974
# Deny warnings on CI to avoid warnings getting into the codebase.
7075
- run: cargo test --features 'deny-warnings'
76+
- name: Check operability of rustc invocation with argfile
77+
env:
78+
__CARGO_TEST_FORCE_ARGFILE: 1
79+
run: |
80+
# This only tests `cargo fix` because fix-proxy-mode is one of the most
81+
# complicated subprocess management in Cargo.
82+
cargo test --test testsuite --features 'deny-warnings' -- fix::
7183
- run: cargo test --features 'deny-warnings' --manifest-path crates/cargo-test-support/Cargo.toml
7284
env:
7385
CARGO_TARGET_DIR: target
@@ -90,20 +102,27 @@ jobs:
90102
# download all workspaces.
91103
cargo test --manifest-path benches/benchsuite/Cargo.toml --all-targets -- cargo
92104
cargo check --manifest-path benches/capture/Cargo.toml
105+
# The testsuite generates a huge amount of data, and fetch-smoke-test was
106+
# running out of disk space.
107+
- name: Clear test output
108+
run: |
109+
df -h
110+
rm -rf target/tmp
111+
df -h
93112
- name: Fetch smoke test
94113
run: ci/fetch-smoke-test.sh
95114

96115
resolver:
97116
runs-on: ubuntu-latest
98117
steps:
99-
- uses: actions/checkout@v2
118+
- uses: actions/checkout@v3
100119
- run: rustup update stable && rustup default stable
101120
- run: cargo test --manifest-path crates/resolver-tests/Cargo.toml
102121

103122
build_std:
104123
runs-on: ubuntu-latest
105124
steps:
106-
- uses: actions/checkout@v2
125+
- uses: actions/checkout@v3
107126
- run: rustup update nightly && rustup default nightly
108127
- run: rustup component add rust-src
109128
- run: cargo build
@@ -113,7 +132,7 @@ jobs:
113132
docs:
114133
runs-on: ubuntu-latest
115134
steps:
116-
- uses: actions/checkout@v2
135+
- uses: actions/checkout@v3
117136
- run: rustup update nightly && rustup default nightly
118137
- run: rustup update stable
119138
- run: rustup component add rust-docs
@@ -133,13 +152,17 @@ jobs:
133152
sh linkcheck.sh --all cargo
134153
135154
success:
155+
permissions:
156+
contents: none
136157
name: bors build finished
137158
needs: [docs, rustfmt, test, resolver, build_std]
138159
runs-on: ubuntu-latest
139160
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
140161
steps:
141162
- run: echo ok
142163
failure:
164+
permissions:
165+
contents: none
143166
name: bors build finished
144167
needs: [docs, rustfmt, test, resolver, build_std]
145168
runs-on: ubuntu-latest

CHANGELOG.md

+226-2
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,241 @@
11
# Changelog
22

3-
## Cargo 1.61 (2022-04-07)
4-
[ea2a21c9...HEAD](https://github.com/rust-lang/cargo/compare/ea2a21c9...HEAD)
3+
## Cargo 1.64 (2022-09-22)
4+
[a5e08c47...HEAD](https://github.com/rust-lang/cargo/compare/a5e08c47...HEAD)
5+
6+
### Added
7+
8+
### Changed
9+
- Bash completion of `cargo install --path` now supports path completion.
10+
[#10798](https://github.com/rust-lang/cargo/pull/10798)
11+
- Significantly improved the performance fetching git dependencies from GitHub
12+
when using a hash in the `rev` field.
13+
[#10079](https://github.com/rust-lang/cargo/pull/10079)
14+
15+
### Fixed
16+
- The `os` output in `cargo --version --verbose` now supports more platforms.
17+
[#10802](https://github.com/rust-lang/cargo/pull/10802)
18+
19+
20+
### Nightly only
21+
- Fixed deserialization of unstable `check-cfg` in `config.toml`.
22+
[#10799](https://github.com/rust-lang/cargo/pull/10799)
23+
24+
25+
## Cargo 1.63 (2022-08-11)
26+
[3f052d8e...rust-1.63.0](https://github.com/rust-lang/cargo/compare/3f052d8e...rust-1.63.0)
27+
28+
### Added
29+
30+
- 🎉 Added the `--config` CLI option to pass config options directly on the CLI.
31+
[#10755](https://github.com/rust-lang/cargo/pull/10755)
32+
- The `CARGO_PKG_RUST_VERSION` environment variable is now set when compiling
33+
a crate if the manifest has the `rust-version` field set.
34+
[#10713](https://github.com/rust-lang/cargo/pull/10713)
35+
36+
37+
### Changed
38+
- A warning is emitted when encountering multiple packages with the same name
39+
in a git dependency. This will ignore packages with `publish=false`.
40+
[#10701](https://github.com/rust-lang/cargo/pull/10701)
41+
[#10767](https://github.com/rust-lang/cargo/pull/10767)
42+
- Change tracking now uses the contents of a `.json` target spec file instead
43+
of its path. This should help avoid rebuilds if the path changes.
44+
[#10746](https://github.com/rust-lang/cargo/pull/10746)
45+
- Git dependencies with a submodule configured with the `update=none` strategy
46+
in `.gitmodules` is now honored, and the submodule will not be fetched.
47+
[#10717](https://github.com/rust-lang/cargo/pull/10717)
48+
- Crate files now use a more recent date (Jul 23, 2006 instead of Nov 29, 1973)
49+
for deterministic behavior.
50+
[#10720](https://github.com/rust-lang/cargo/pull/10720)
51+
- The initial template used for `cargo new` now includes a slightly more
52+
realistic test structure that has `use super::*;` in the test module.
53+
[#10706](https://github.com/rust-lang/cargo/pull/10706)
54+
- Updated the internal HTTP library libcurl with various small fixes and updates.
55+
[#10696](https://github.com/rust-lang/cargo/pull/10696)
56+
57+
### Fixed
58+
- Fix zsh completions for `cargo add` and `cargo locate-project`
59+
[#10810](https://github.com/rust-lang/cargo/pull/10810)
60+
[#10811](https://github.com/rust-lang/cargo/pull/10811)
61+
- Fixed `-p` being ignored with `cargo publish` in the root of a virtual
62+
workspace. Some additional checks were also added to generate an error if
63+
multiple packages were selected (previously it would pick the first one).
64+
[#10677](https://github.com/rust-lang/cargo/pull/10677)
65+
- The human-readable executable name is no longer displayed for `cargo test`
66+
when using JSON output.
67+
[#10691](https://github.com/rust-lang/cargo/pull/10691)
68+
69+
### Nightly only
70+
71+
- Added `-Zcheck-cfg=output` to support build-scripts declaring their
72+
supported set of `cfg` values with `cargo:rustc-check-cfg`.
73+
[#10539](https://github.com/rust-lang/cargo/pull/10539)
74+
- `-Z http-registry` now uses https://index.crates.io/ when accessing crates-io.
75+
[#10725](https://github.com/rust-lang/cargo/pull/10725)
76+
- Fixed formatting of `.workspace` key in `cargo add` for workspace inheritance.
77+
[#10705](https://github.com/rust-lang/cargo/pull/10705)
78+
- Sparse HTTP registry URLs must now end with a `/`.
79+
[#10698](https://github.com/rust-lang/cargo/pull/10698)
80+
- Fixed issue with `cargo add` and workspace inheritance of the `default-features` key.
81+
[#10685](https://github.com/rust-lang/cargo/pull/10685)
82+
83+
84+
85+
## Cargo 1.62 (2022-06-30)
86+
[1ef1e0a1...rust-1.62.0](https://github.com/rust-lang/cargo/compare/1ef1e0a1...rust-1.62.0)
87+
88+
### Added
89+
90+
- 🎉 Added the `cargo add` command for adding dependencies to `Cargo.toml` from
91+
the command-line.
92+
[docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-add.html)
93+
[#10472](https://github.com/rust-lang/cargo/pull/10472)
94+
[#10577](https://github.com/rust-lang/cargo/pull/10577)
95+
[#10578](https://github.com/rust-lang/cargo/pull/10578)
96+
- Package ID specs now support `name@version` syntax in addition to the
97+
previous `name:version` to align with the behavior in `cargo add` and other
98+
tools. `cargo install` and `cargo yank` also now support this syntax so the
99+
version does not need to passed as a separate flag.
100+
[#10582](https://github.com/rust-lang/cargo/pull/10582)
101+
[#10650](https://github.com/rust-lang/cargo/pull/10650)
102+
[#10597](https://github.com/rust-lang/cargo/pull/10597)
103+
- Added the CLI option `-F` as an alias of `--features`.
104+
[#10576](https://github.com/rust-lang/cargo/pull/10576)
105+
- The `git` and `registry` directories in Cargo's home directory (usually
106+
`~/.cargo`) are now marked as cache directories so that they are not
107+
included in backups or content indexing (on Windows).
108+
[#10553](https://github.com/rust-lang/cargo/pull/10553)
109+
- Added the `--version` flag to `cargo yank` to replace the `--vers` flag to
110+
be consistent with `cargo install`.
111+
[#10575](https://github.com/rust-lang/cargo/pull/10575)
112+
- Added automatic `@` argfile support, which will use "response files" if the
113+
command-line to `rustc` exceeds the operating system's limit.
114+
[#10546](https://github.com/rust-lang/cargo/pull/10546)
115+
- `cargo clean` now has a progress bar (if it takes longer than half a second).
116+
[#10236](https://github.com/rust-lang/cargo/pull/10236)
117+
118+
### Changed
119+
120+
- `cargo install` no longer generates an error if no binaries were found
121+
to install (such as missing required features).
122+
[#10508](https://github.com/rust-lang/cargo/pull/10508)
123+
- `cargo test` now passes `--target` to `rustdoc` if the specified target is
124+
the same as the host target.
125+
[#10594](https://github.com/rust-lang/cargo/pull/10594)
126+
- `cargo doc` now automatically passes `-Arustdoc::private-intra-doc-links`
127+
when documenting a binary (which automatically includes
128+
`--document-private-items`). The
129+
[`private-intra-doc-links`](https://doc.rust-lang.org/rustdoc/lints.html#private_intra_doc_links)
130+
lint is only relevant when *not* documenting private items, which doesn't
131+
apply to binaries.
132+
[#10142](https://github.com/rust-lang/cargo/pull/10142)
133+
- The length of the short git hash in the `cargo --version` output is now
134+
fixed to 9 characters. Previously the length was inconsistent between
135+
different platforms.
136+
[#10579](https://github.com/rust-lang/cargo/pull/10579)
137+
- Attempting to publish a package with a `Cargo.toml.orig` file will now
138+
result in an error. The filename would otherwise conflict with the
139+
automatically-generated file.
140+
[#10551](https://github.com/rust-lang/cargo/pull/10551)
141+
142+
### Fixed
143+
144+
- The `build.dep-info-basedir` configuration setting now properly supports the
145+
use of `..` in the path to refer to a parent directory.
146+
[#10281](https://github.com/rust-lang/cargo/pull/10281)
147+
- Fixed regression in automatic detection of the default number of CPUs to use
148+
on systems using cgroups v1.
149+
[#10737](https://github.com/rust-lang/cargo/pull/10737)
150+
[#10739](https://github.com/rust-lang/cargo/pull/10739)
151+
152+
153+
### Nightly only
154+
155+
- `cargo fetch` now works with `-Zbuild-std` to fetch the standard library's dependencies.
156+
[#10129](https://github.com/rust-lang/cargo/pull/10129)
157+
- Added support for workspace inheritance.
158+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#workspace-inheritance)
159+
[#10584](https://github.com/rust-lang/cargo/pull/10584)
160+
[#10568](https://github.com/rust-lang/cargo/pull/10568)
161+
[#10565](https://github.com/rust-lang/cargo/pull/10565)
162+
[#10564](https://github.com/rust-lang/cargo/pull/10564)
163+
[#10563](https://github.com/rust-lang/cargo/pull/10563)
164+
[#10606](https://github.com/rust-lang/cargo/pull/10606)
165+
[#10548](https://github.com/rust-lang/cargo/pull/10548)
166+
[#10538](https://github.com/rust-lang/cargo/pull/10538)
167+
- Added `-Zcheck-cfg` which adds various forms of validating `cfg` expressions
168+
for unknown names and values.
169+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg)
170+
[#10486](https://github.com/rust-lang/cargo/pull/10486)
171+
[#10566](https://github.com/rust-lang/cargo/pull/10566)
172+
- The `--config` CLI option no longer allows setting a registry token.
173+
[#10580](https://github.com/rust-lang/cargo/pull/10580)
174+
- Fixed issues with proc-macros and `-Z rustdoc-scrape-examples`.
175+
[#10549](https://github.com/rust-lang/cargo/pull/10549)
176+
[#10533](https://github.com/rust-lang/cargo/pull/10533)
177+
178+
179+
## Cargo 1.61 (2022-05-19)
180+
[ea2a21c9...rust-1.61.0](https://github.com/rust-lang/cargo/compare/ea2a21c9...rust-1.61.0)
5181

6182
### Added
7183

8184
### Changed
9185

10186
- `cargo test --no-run` will now display the path to the test executables.
11187
[#10346](https://github.com/rust-lang/cargo/pull/10346)
188+
- `cargo tree --duplicates` no longer reports dependencies that are shared
189+
between the host and the target as duplicates.
190+
[#10466](https://github.com/rust-lang/cargo/pull/10466)
191+
- Updated to the 1.4.2 release of libgit2 which brings in several fixes
192+
[#10442](https://github.com/rust-lang/cargo/pull/10442)
193+
[#10479](https://github.com/rust-lang/cargo/pull/10479)
194+
- `cargo vendor` no longer allows multiple values for `--sync`, you must pass
195+
multiple `--sync` flags instead.
196+
[#10448](https://github.com/rust-lang/cargo/pull/10448)
197+
- Warnings are now issued for manifest keys that have mixed both underscore
198+
and dash variants (such as specifying both `proc_macro` and `proc-macro`)
199+
[#10316](https://github.com/rust-lang/cargo/pull/10316)
200+
- Cargo now uses the standard library's `available_parallelism` instead of the
201+
`num_cpus` crate for determining the default parallelism.
202+
[#10427](https://github.com/rust-lang/cargo/pull/10427)
203+
- `cargo search` terms are now highlighted.
204+
[#10425](https://github.com/rust-lang/cargo/pull/10425)
12205

13206
### Fixed
14207

208+
- Paths passed to VCS tools like `hg` are now added after `--` to avoid
209+
conflict with VCS flags.
210+
[#10483](https://github.com/rust-lang/cargo/pull/10483)
211+
- Fixed the `http.timeout` configuration value to actually work.
212+
[#10456](https://github.com/rust-lang/cargo/pull/10456)
213+
- Fixed issues with `cargo rustc --crate-type` not working in some situations.
214+
[#10388](https://github.com/rust-lang/cargo/pull/10388)
215+
15216
### Nightly only
16217

17218
- Added `-Z check-cfg-features` to enable compile-time checking of features
18219
[#10408](https://github.com/rust-lang/cargo/pull/10408)
19220
- Added `-Z bindeps` to support binary artifact dependencies (RFC-3028)
20221
[#9992](https://github.com/rust-lang/cargo/pull/9992)
222+
- `-Z multitarget` is now supported in the `build.target` config value with an array.
223+
[#10473](https://github.com/rust-lang/cargo/pull/10473)
224+
- Added `--keep-going` flag which will continue compilation even if one crate
225+
fails to compile.
226+
[#10383](https://github.com/rust-lang/cargo/pull/10383)
227+
- Start work on inheriting manifest values in a workspace.
228+
[#10497](https://github.com/rust-lang/cargo/pull/10497)
229+
[#10517](https://github.com/rust-lang/cargo/pull/10517)
230+
- Added support for sparse HTTP registries.
231+
[#10470](https://github.com/rust-lang/cargo/pull/10470)
232+
[#10064](https://github.com/rust-lang/cargo/pull/10064)
233+
- Fixed panic when artifact target is used for `[target.'cfg(<target>)'.dependencies]`
234+
[#10433](https://github.com/rust-lang/cargo/pull/10433)
235+
- Fixed host flags to pass to build scripts (`-Z target-applies-to-host`)
236+
[#10395](https://github.com/rust-lang/cargo/pull/10395)
237+
- Added `-Z check-cfg-features` support for rustdoc
238+
[#10428](https://github.com/rust-lang/cargo/pull/10428)
21239

22240

23241
## Cargo 1.60 (2022-04-07)
@@ -89,13 +307,19 @@
89307
- `cargo test TEST_FILTER` should no longer build binaries that are explicitly
90308
disabled with `test = false`.
91309
[#10305](https://github.com/rust-lang/cargo/pull/10305)
310+
- Fixed regression with `term.verbose` without `term.quiet`, and vice versa.
311+
[#10429](https://github.com/rust-lang/cargo/pull/10429)
312+
[#10436](https://github.com/rust-lang/cargo/pull/10436)
92313

93314
### Nightly only
94315

95316
- Added `rustflags` option to a profile definition.
96317
[#10217](https://github.com/rust-lang/cargo/pull/10217)
97318
- Changed `--config` to only support dotted keys.
98319
[#10176](https://github.com/rust-lang/cargo/pull/10176)
320+
- Fixed profile `rustflags` not being gated in profile overrides.
321+
[#10411](https://github.com/rust-lang/cargo/pull/10411)
322+
[#10413](https://github.com/rust-lang/cargo/pull/10413)
99323

100324
## Cargo 1.59 (2022-02-24)
101325
[7f08ace4...rust-1.59.0](https://github.com/rust-lang/cargo/compare/7f08ace4...rust-1.59.0)

0 commit comments

Comments
 (0)