]> git.proxmox.com Git - cargo.git/blame - CHANGELOG.md
Auto merge of #10862 - Muscraft:workspace-selection-test, r=epage
[cargo.git] / CHANGELOG.md
CommitLineData
2cbb701b
EH
1# Changelog
2
77aebb50
EH
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
f4c174d5 25## Cargo 1.63 (2022-08-11)
77aebb50 26[3f052d8e...rust-1.63.0](https://github.com/rust-lang/cargo/compare/3f052d8e...rust-1.63.0)
f4c174d5
EH
27
28### Added
29
77aebb50
EH
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
f4c174d5 37### Changed
77aebb50
EH
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)
f4c174d5
EH
56
57### Fixed
77aebb50
EH
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)
f4c174d5
EH
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)
77aebb50
EH
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
f4c174d5
EH
83
84
51106c94 85## Cargo 1.62 (2022-06-30)
f4c174d5 86[1ef1e0a1...rust-1.62.0](https://github.com/rust-lang/cargo/compare/1ef1e0a1...rust-1.62.0)
333f32c7
EH
87
88### Added
89
f4c174d5
EH
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
333f32c7
EH
118### Changed
119
f4c174d5 120- `cargo install` no longer generates an error if no binaries were found
333f32c7
EH
121 to install (such as missing required features).
122 [#10508](https://github.com/rust-lang/cargo/pull/10508)
f4c174d5
EH
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)
333f32c7
EH
141
142### Fixed
143
f4c174d5
EH
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)
77aebb50
EH
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)
f4c174d5
EH
151
152
333f32c7
EH
153### Nightly only
154
f4c174d5
EH
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
333f32c7 178
51106c94 179## Cargo 1.61 (2022-05-19)
333f32c7 180[ea2a21c9...rust-1.61.0](https://github.com/rust-lang/cargo/compare/ea2a21c9...rust-1.61.0)
019218fe
EH
181
182### Added
183
184### Changed
185
186- `cargo test --no-run` will now display the path to the test executables.
187 [#10346](https://github.com/rust-lang/cargo/pull/10346)
333f32c7
EH
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)
019218fe
EH
205
206### Fixed
207
333f32c7
EH
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
019218fe
EH
216### Nightly only
217
218- Added `-Z check-cfg-features` to enable compile-time checking of features
219 [#10408](https://github.com/rust-lang/cargo/pull/10408)
220- Added `-Z bindeps` to support binary artifact dependencies (RFC-3028)
221 [#9992](https://github.com/rust-lang/cargo/pull/9992)
333f32c7
EH
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)
a9faf490 230- Added support for sparse HTTP registries.
333f32c7
EH
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)
019218fe
EH
239
240
171f67d6 241## Cargo 1.60 (2022-04-07)
019218fe 242[358e79fe...rust-1.60.0](https://github.com/rust-lang/cargo/compare/358e79fe...rust-1.60.0)
171f67d6
EH
243
244### Added
019218fe 245
171f67d6
EH
246- 🎉 Added the `dep:` prefix in the `[features]` table to refer to an optional
247 dependency. This allows creating feature names with the same name as a
248 dependency, and allows for "hiding" optional dependencies so that they do
249 not implicitly expose a feature name.
250 [docs](https://doc.rust-lang.org/nightly/cargo/reference/features.html#optional-dependencies)
251 [#10269](https://github.com/rust-lang/cargo/pull/10269)
252- 🎉 Added the `dep-name?/feature-name` syntax to the `[features]` table to
253 only enable the feature `feature-name` if the optional dependency `dep-name`
254 is already enabled by some other feature.
255 [docs](https://doc.rust-lang.org/nightly/cargo/reference/features.html#dependency-features)
256 [#10269](https://github.com/rust-lang/cargo/pull/10269)
019218fe
EH
257- 🎉 Added `--timings` option to generate an HTML report about build timing,
258 concurrency, and CPU use.
259 [docs](https://doc.rust-lang.org/nightly/cargo/reference/timings.html)
260 [#10245](https://github.com/rust-lang/cargo/pull/10245)
171f67d6
EH
261- Added the `"v"` and `"features2"` fields to the registry index.
262 The `"v"` field provides a method for compatibility with future changes to the index.
263 [docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format)
264 [#10269](https://github.com/rust-lang/cargo/pull/10269)
019218fe
EH
265- Added bash completion for `cargo clippy`
266 [#10347](https://github.com/rust-lang/cargo/pull/10347)
267- Added bash completion for `cargo report`
268 [#10295](https://github.com/rust-lang/cargo/pull/10295)
269- Added support to build scripts for `rustc-link-arg-tests`,
270 `rustc-link-arg-examples`, and `rustc-link-arg-benches`.
271 [docs](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#outputs-of-the-build-script)
272 [#10274](https://github.com/rust-lang/cargo/pull/10274)
171f67d6
EH
273
274### Changed
019218fe 275
171f67d6
EH
276- Cargo now uses the clap 3 library for command-line argument parsing.
277 [#10265](https://github.com/rust-lang/cargo/pull/10265)
278- The `build.pipelining` config option is now deprecated, pipelining will now
279 always be enabled.
280 [#10258](https://github.com/rust-lang/cargo/pull/10258)
019218fe
EH
281- `cargo new` will now generate a `.gitignore` which only ignores `Cargo.lock`
282 in the root of the repo, instead of any directory.
283 [#10379](https://github.com/rust-lang/cargo/pull/10379)
284- Improved startup time of bash completion.
285 [#10365](https://github.com/rust-lang/cargo/pull/10365)
286- The `--features` flag is now honored when used with the `--all-features`
287 flag, which allows enabling features from other packages.
288 [#10337](https://github.com/rust-lang/cargo/pull/10337)
289- Cargo now uses a different TOML parser. This should not introduce any
290 user-visible changes. This paves the way to support format-preserving
291 programmatic modification of TOML files for supporting `cargo add` and other
292 future enhancements.
293 [#10086](https://github.com/rust-lang/cargo/pull/10086)
294- Setting a library to emit both a `dylib` and `cdylib` is now an error, as
295 this combination is not supported.
296 [#10243](https://github.com/rust-lang/cargo/pull/10243)
297- `cargo --list` now includes the `help` command.
298 [#10300](https://github.com/rust-lang/cargo/pull/10300)
171f67d6
EH
299
300### Fixed
301
019218fe
EH
302- Fixed running `cargo doc` on examples with dev-dependencies.
303 [#10341](https://github.com/rust-lang/cargo/pull/10341)
304- Fixed `cargo install --path` for a path that is relative to a directory
305 outside of the workspace in the current directory.
306 [#10335](https://github.com/rust-lang/cargo/pull/10335)
307- `cargo test TEST_FILTER` should no longer build binaries that are explicitly
308 disabled with `test = false`.
309 [#10305](https://github.com/rust-lang/cargo/pull/10305)
333f32c7
EH
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)
019218fe 313
171f67d6 314### Nightly only
019218fe 315
171f67d6
EH
316- Added `rustflags` option to a profile definition.
317 [#10217](https://github.com/rust-lang/cargo/pull/10217)
019218fe
EH
318- Changed `--config` to only support dotted keys.
319 [#10176](https://github.com/rust-lang/cargo/pull/10176)
333f32c7
EH
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)
171f67d6 323
f682131a 324## Cargo 1.59 (2022-02-24)
171f67d6 325[7f08ace4...rust-1.59.0](https://github.com/rust-lang/cargo/compare/7f08ace4...rust-1.59.0)
f682131a
EH
326
327### Added
328
171f67d6
EH
329- 🎉 The `strip` option can now be specified in a profile to specify the
330 behavior for removing symbols and debug information from binaries.
331 [docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#strip)
332 [#10088](https://github.com/rust-lang/cargo/pull/10088)
019218fe 333 [#10376](https://github.com/rust-lang/cargo/pull/10376)
171f67d6
EH
334- 🎉 Added future incompatible reporting.
335 This provides reporting for when a future change in `rustc` may cause a
336 package or any of its dependencies to stop building.
337 [docs](https://doc.rust-lang.org/nightly/cargo/reference/future-incompat-report.html)
338 [#10165](https://github.com/rust-lang/cargo/pull/10165)
339- SSH authentication on Windows now supports ssh-agent.
340 [docs](https://doc.rust-lang.org/nightly/cargo/appendix/git-authentication.html#ssh-authentication)
341 [#10248](https://github.com/rust-lang/cargo/pull/10248)
342- Added `term.quiet` configuration option to enable the `--quiet` behavior
343 from a config file.
344 [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#termquiet)
345 [#10152](https://github.com/rust-lang/cargo/pull/10152)
346- Added `-r` CLI option as an alias for `--release`.
347 [#10133](https://github.com/rust-lang/cargo/pull/10133)
348
f682131a
EH
349### Changed
350
171f67d6
EH
351- Scanning the package directory should now be resilient to errors, such as
352 filesystem loops or access issues.
353 [#10188](https://github.com/rust-lang/cargo/pull/10188)
354 [#10214](https://github.com/rust-lang/cargo/pull/10214)
355 [#10286](https://github.com/rust-lang/cargo/pull/10286)
356- `cargo help <alias>` will now show the target of the alias.
357 [#10193](https://github.com/rust-lang/cargo/pull/10193)
358- Removed the deprecated `--host` CLI option.
359 [#10145](https://github.com/rust-lang/cargo/pull/10145)
019218fe 360 [#10327](https://github.com/rust-lang/cargo/pull/10327)
171f67d6
EH
361- Cargo should now report its version to always be in sync with `rustc`.
362 [#10178](https://github.com/rust-lang/cargo/pull/10178)
363- Added EOPNOTSUPP to ignored file locking errors, which is relevant to BSD
364 operating systems.
365 [#10157](https://github.com/rust-lang/cargo/pull/10157)
366
f682131a
EH
367### Fixed
368
171f67d6
EH
369- macOS: Fixed an issue where running an executable would sporadically be
370 killed by the kernel (likely starting in macOS 12).
371 [#10196](https://github.com/rust-lang/cargo/pull/10196)
372- Fixed so that the `doc=false` setting is honored in the `[lib]` definition
373 of a dependency.
374 [#10201](https://github.com/rust-lang/cargo/pull/10201)
019218fe 375 [#10324](https://github.com/rust-lang/cargo/pull/10324)
171f67d6
EH
376- The `"executable"` field in the JSON option was incorrectly including the
377 path to `index.html` when documenting a binary. It is now null.
378 [#10171](https://github.com/rust-lang/cargo/pull/10171)
379- Documenting a binary now waits for the package library to finish documenting
380 before starting. This fixes some race conditions if the binary has intra-doc
381 links to the library.
382 [#10172](https://github.com/rust-lang/cargo/pull/10172)
383- Fixed panic when displaying help text to a closed pipe.
384 [#10164](https://github.com/rust-lang/cargo/pull/10164)
385
f682131a
EH
386### Nightly only
387- Added the `--crate-type` flag to `cargo rustc`.
388 [#10093](https://github.com/rust-lang/cargo/pull/10093)
389
390
333ee58d 391## Cargo 1.58 (2022-01-13)
f682131a 392[b2e52d7c...rust-1.58.0](https://github.com/rust-lang/cargo/compare/b2e52d7c...rust-1.58.0)
333ee58d
EH
393
394### Added
395
396- Added `rust_version` field to package data in `cargo metadata`.
397 [#9967](https://github.com/rust-lang/cargo/pull/9967)
f682131a
EH
398- Added `--message-format` option to `cargo install`.
399 [#10107](https://github.com/rust-lang/cargo/pull/10107)
333ee58d
EH
400
401### Changed
402
f682131a
EH
403- A warning is now shown when an alias shadows an external command.
404 [#10082](https://github.com/rust-lang/cargo/pull/10082)
405- Updated curl to 7.80.0.
406 [#10040](https://github.com/rust-lang/cargo/pull/10040)
407 [#10106](https://github.com/rust-lang/cargo/pull/10106)
408
333ee58d
EH
409### Fixed
410
411- Doctests now include rustc-link-args from build scripts.
412 [#9916](https://github.com/rust-lang/cargo/pull/9916)
f682131a
EH
413- Fixed `cargo tree` entering an infinite loop with cyclical dev-dependencies.
414 Fixed an edge case where the resolver would fail to handle a cyclical dev-dependency with a feature.
415 [#10103](https://github.com/rust-lang/cargo/pull/10103)
416- Fixed `cargo clean -p` when the directory path contains glob characters.
417 [#10072](https://github.com/rust-lang/cargo/pull/10072)
418- Fixed debug builds of `cargo` which could panic when downloading a crate
419 when the server has a redirect with a non-empty body.
420 [#10048](https://github.com/rust-lang/cargo/pull/10048)
333ee58d
EH
421
422### Nightly only
423
424- Make future-incompat-report output more user-friendly.
425 [#9953](https://github.com/rust-lang/cargo/pull/9953)
f682131a
EH
426- Added support to scrape code examples from the `examples` directory to be included in the documentation.
427 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#scrape-examples)
428 [#9525](https://github.com/rust-lang/cargo/pull/9525)
429 [#10037](https://github.com/rust-lang/cargo/pull/10037)
430 [#10017](https://github.com/rust-lang/cargo/pull/10017)
431- Fixed `cargo report future-incompatibilities` to check stdout if it supports color.
432 [#10024](https://github.com/rust-lang/cargo/pull/10024)
333ee58d 433
8fe9eca8 434## Cargo 1.57 (2021-12-02)
333ee58d 435[18751dd3...rust-1.57.0](https://github.com/rust-lang/cargo/compare/18751dd3...rust-1.57.0)
8fe9eca8
EH
436
437### Added
438
333ee58d
EH
439- 🎉 Added custom named profiles. This also changes the `test` and `bench`
440 profiles to inherit their settings from `dev` and `release`, and Cargo will
441 now only use a single profile during a given command instead of using
442 different profiles for dependencies and cargo-targets.
443 [docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#custom-profiles)
444 [#9943](https://github.com/rust-lang/cargo/pull/9943)
8fe9eca8
EH
445- The `rev` option for a git dependency now supports git references that start
446 with `refs/`. An example where this can be used is to depend on a pull
447 request from a service like GitHub before it is merged.
448 [#9859](https://github.com/rust-lang/cargo/pull/9859)
333ee58d
EH
449- Added `path_in_vcs` field to the `.cargo_vcs_info.json` file.
450 [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-package.html#cargo_vcs_infojson-format)
451 [#9866](https://github.com/rust-lang/cargo/pull/9866)
8fe9eca8
EH
452
453### Changed
454
cfee33e8
EH
455- ❗ `RUSTFLAGS` is no longer set for build scripts. This change was made in
456 1.55, but the release notes did not highlight this change. Build scripts
457 should use `CARGO_ENCODED_RUSTFLAGS` instead. See the
458 [documentation](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
459 for more details.
333ee58d
EH
460- The `cargo version` command now includes some extra information.
461 [#9968](https://github.com/rust-lang/cargo/pull/9968)
462- Updated libgit2 to 1.3 which brings in a number of fixes and changes to git
463 handling.
464 [#9963](https://github.com/rust-lang/cargo/pull/9963)
465 [#9988](https://github.com/rust-lang/cargo/pull/9988)
466- Shell completions now include shorthand b/r/c/d subcommands.
467 [#9951](https://github.com/rust-lang/cargo/pull/9951)
468- `cargo update --precise` now allows specifying a version without semver
469 metadata (stuff after `+` in the version number).
470 [#9945](https://github.com/rust-lang/cargo/pull/9945)
471- zsh completions now complete `--example` names.
472 [#9939](https://github.com/rust-lang/cargo/pull/9939)
473- The progress bar now differentiates when building unittests.
474 [#9934](https://github.com/rust-lang/cargo/pull/9934)
475- Some backwards-compatibility support for invalid TOML syntax has been removed.
476 [#9932](https://github.com/rust-lang/cargo/pull/9932)
477- Reverted the change from 1.55 that triggered an error for dependency
478 specifications that did not include any fields.
479 [#9911](https://github.com/rust-lang/cargo/pull/9911)
480
8fe9eca8
EH
481### Fixed
482
483- Removed a log message (from `CARGO_LOG`) that may leak tokens.
484 [#9873](https://github.com/rust-lang/cargo/pull/9873)
333ee58d
EH
485- `cargo fix` will now avoid writing fixes to the global registry cache.
486 [#9938](https://github.com/rust-lang/cargo/pull/9938)
487- Fixed `-Z help` CLI option when used with a shorthand alias (b/c/r/d).
488 [#9933](https://github.com/rust-lang/cargo/pull/9933)
489
8fe9eca8
EH
490
491### Nightly only
492
493
570107f8 494## Cargo 1.56 (2021-10-21)
8fe9eca8 495[cebef295...rust-1.56.0](https://github.com/rust-lang/cargo/compare/cebef295...rust-1.56.0)
570107f8
EH
496
497### Added
498
8fe9eca8
EH
499- 🎉 Cargo now supports the 2021 edition.
500 More information may be found in the [edition
501 guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2021/index.html).
502 [#9800](https://github.com/rust-lang/cargo/pull/9800)
503- 🎉 Added the
504 [`rust-version`](https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field)
505 field to `Cargo.toml` to specify the minimum supported Rust version, and the
506 `--ignore-rust-version` command line option to override it.
507 [#9732](https://github.com/rust-lang/cargo/pull/9732)
508- Added the `[env]` table to config files to specify environment variables to
509 set.
510 [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#env)
511 [#9411](https://github.com/rust-lang/cargo/pull/9411)
512- `[patch]` tables may now be specified in config files.
513 [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#patch)
514 [#9839](https://github.com/rust-lang/cargo/pull/9839)
515- `cargo doc` now supports the `--example` and `--examples` flags.
516 [#9808](https://github.com/rust-lang/cargo/pull/9808)
517- 🎉 Build scripts can now pass additional linker arguments for binaries or all
570107f8
EH
518 linkable targets. [docs](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#outputs-of-the-build-script)
519 [#9557](https://github.com/rust-lang/cargo/pull/9557)
520- Added support for the `-p` flag for `cargo publish` to publish a specific
521 package in a workspace. `cargo package` also now supports `-p` and
522 `--workspace`.
523 [#9559](https://github.com/rust-lang/cargo/pull/9559)
8fe9eca8
EH
524- Added documentation about third-party registries.
525 [#9830](https://github.com/rust-lang/cargo/pull/9830)
526- Added the `{sha256-checksum}` placeholder for URLs in a registry `config.json`.
527 [docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format)
528 [#9801](https://github.com/rust-lang/cargo/pull/9801)
529- Added a warning when a dependency does not have a library.
530 [#9771](https://github.com/rust-lang/cargo/pull/9771)
570107f8
EH
531
532### Changed
533
534- Doc tests now support the `-q` flag to show terse test output.
535 [#9730](https://github.com/rust-lang/cargo/pull/9730)
536- `features` used in a `[replace]` table now issues a warning, as they are ignored.
537 [#9681](https://github.com/rust-lang/cargo/pull/9681)
538- Changed so that only `wasm32-unknown-emscripten` executables are built
539 without a hash in the filename. Previously it was all `wasm32` targets.
540 Additionally, all `apple` binaries are now built with a hash in the
541 filename. This allows multiple copies to be cached at once, and matches the
542 behavior on other platforms (except `msvc`).
543 [#9653](https://github.com/rust-lang/cargo/pull/9653)
8fe9eca8
EH
544- `cargo new` now generates an example that doesn't generate a warning with
545 clippy.
546 [#9796](https://github.com/rust-lang/cargo/pull/9796)
547- `cargo fix --edition` now only applies edition-specific lints.
548 [#9846](https://github.com/rust-lang/cargo/pull/9846)
549- Improve resolver message to include dependency requirements.
550 [#9827](https://github.com/rust-lang/cargo/pull/9827)
551- `cargo fix` now has more debug logging available with the `CARGO_LOG`
552 environment variable.
553 [#9831](https://github.com/rust-lang/cargo/pull/9831)
554- Changed `cargo fix --edition` to emit a warning when on the latest stable
555 edition when running on stable instead of generating an error.
556 [#9792](https://github.com/rust-lang/cargo/pull/9792)
557- `cargo install` will now determine all of the packages to install before
558 starting the installation, which should help with reporting errors without
559 partially installing.
560 [#9793](https://github.com/rust-lang/cargo/pull/9793)
561- The resolver report for `cargo fix --edition` now includes differences for
562 dev-dependencies.
563 [#9803](https://github.com/rust-lang/cargo/pull/9803)
564- `cargo fix` will now show better diagnostics for abnormal errors from `rustc`.
565 [#9799](https://github.com/rust-lang/cargo/pull/9799)
566- Entries in `cargo --list` are now deduplicated.
567 [#9773](https://github.com/rust-lang/cargo/pull/9773)
568- Aliases are now included in `cargo --list`.
569 [#9764](https://github.com/rust-lang/cargo/pull/9764)
570107f8
EH
570
571### Fixed
572
8fe9eca8
EH
573- Fixed panic with build-std of a proc-macro.
574 [#9834](https://github.com/rust-lang/cargo/pull/9834)
575- Fixed running `cargo` recursively from proc-macros while running `cargo fix`.
576 [#9818](https://github.com/rust-lang/cargo/pull/9818)
577- Return an error instead of a stack overflow for command alias loops.
578 [#9791](https://github.com/rust-lang/cargo/pull/9791)
333ee58d
EH
579- Updated to curl 7.79.1, which will hopefully fix intermittent http2 errors.
580 [#9937](https://github.com/rust-lang/cargo/pull/9937)
8fe9eca8 581
570107f8
EH
582### Nightly only
583
8fe9eca8
EH
584- Added `[future-incompat-report]` config section.
585 [#9774](https://github.com/rust-lang/cargo/pull/9774)
586- Fixed value-after-table error with custom named profiles.
587 [#9789](https://github.com/rust-lang/cargo/pull/9789)
588- Added the `different-binary-name` feature to support specifying a
589 non-rust-identifier for a binary name.
590 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#different-binary-name)
591 [#9627](https://github.com/rust-lang/cargo/pull/9627)
592- Added a profile option to select the codegen backend.
593 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#codegen-backend)
594 [#9118](https://github.com/rust-lang/cargo/pull/9118)
595
570107f8 596
ff3155db 597## Cargo 1.55 (2021-09-09)
570107f8 598[aa8b0929...rust-1.55.0](https://github.com/rust-lang/cargo/compare/aa8b0929...rust-1.55.0)
ff3155db
EH
599
600### Added
601
602- The package definition in `cargo metadata` now includes the `"default_run"`
603 field from the manifest.
604 [#9550](https://github.com/rust-lang/cargo/pull/9550)
cfee33e8 605- ❗ Build scripts now have access to the following environment variables:
570107f8 606 `RUSTC_WRAPPER`, `RUSTC_WORKSPACE_WRAPPER`, `CARGO_ENCODED_RUSTFLAGS`.
cfee33e8
EH
607 `RUSTFLAGS` is no longer set for build scripts; they should use
608 `CARGO_ENCODED_RUSTFLAGS` instead.
570107f8
EH
609 [docs](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
610 [#9601](https://github.com/rust-lang/cargo/pull/9601)
611- Added `cargo d` as an alias for `cargo doc`.
612 [#9680](https://github.com/rust-lang/cargo/pull/9680)
613- Added `{lib}` to the `cargo tree --format` option to display the library
614 name of a package.
615 [#9663](https://github.com/rust-lang/cargo/pull/9663)
616- Added `members_mut` method to the `Workspace` API.
617 [#9547](https://github.com/rust-lang/cargo/pull/9547)
ff3155db
EH
618
619### Changed
620
621- If a build command does not match any targets when using the
622 `--all-targets`, `--bins`, `--tests`, `--examples`, or `--benches` flags, a
623 warning is now displayed to inform you that there were no matching targets.
624 [#9549](https://github.com/rust-lang/cargo/pull/9549)
625- The way `cargo init` detects whether or not existing source files represent
626 a binary or library has been changed to respect the command-line flags
627 instead of trying to guess which type it is.
628 [#9522](https://github.com/rust-lang/cargo/pull/9522)
570107f8
EH
629- Registry names are now displayed instead of registry URLs when possible.
630 [#9632](https://github.com/rust-lang/cargo/pull/9632)
631- Duplicate compiler diagnostics are no longer shown. This can often happen
632 with `cargo test` which builds multiple copies of the same code in parallel.
633 This also updates the warning summary to provide more context.
634 [#9675](https://github.com/rust-lang/cargo/pull/9675)
635- The output for warnings or errors is now improved to be leaner, cleaner, and
636 show more context.
637 [#9655](https://github.com/rust-lang/cargo/pull/9655)
638- Network send errors are now treated as "spurious" which means they will be retried.
639 [#9695](https://github.com/rust-lang/cargo/pull/9695)
640- Git keys (`branch`, `tag`, `rev`) on a non-git dependency are now an error.
641 Additionally, specifying both `git` and `path` is now an error.
642 [#9689](https://github.com/rust-lang/cargo/pull/9689)
643- Specifying a dependency without any keys is now an error.
644 [#9686](https://github.com/rust-lang/cargo/pull/9686)
645- The resolver now prefers to use `[patch]` table entries of dependencies when
646 possible.
647 [#9639](https://github.com/rust-lang/cargo/pull/9639)
648- Package name typo errors in dependencies are now displayed aligned with the
649 original to help make it easier to see the difference.
650 [#9665](https://github.com/rust-lang/cargo/pull/9665)
651- Windows platforms may now warn on environment variables that have the wrong case.
652 [#9654](https://github.com/rust-lang/cargo/pull/9654)
653- `features` used in a `[patch]` table now issues a warning, as they are ignored.
654 [#9666](https://github.com/rust-lang/cargo/pull/9666)
655- The `target` directory is now excluded from content indexing on Windows.
656 [#9635](https://github.com/rust-lang/cargo/pull/9635)
657- When `Cargo.toml` is not found, the error message now detects if it was
658 misnamed with a lowercase `c` to suggest the correct form.
659 [#9607](https://github.com/rust-lang/cargo/pull/9607)
660- Building `diesel` with the new resolver displays a compatibility notice.
661 [#9602](https://github.com/rust-lang/cargo/pull/9602)
662- Updated the `opener` dependency, which handles opening a web browser, which
663 includes several changes, such as new behavior when run on WSL, and using
664 the system `xdg-open` on Linux.
665 [#9583](https://github.com/rust-lang/cargo/pull/9583)
8fe9eca8
EH
666- Updated to libcurl 7.78.
667 [#9809](https://github.com/rust-lang/cargo/pull/9809)
668 [#9810](https://github.com/rust-lang/cargo/pull/9810)
ff3155db
EH
669
670### Fixed
671
672- Fixed dep-info files including non-local build script paths.
673 [#9596](https://github.com/rust-lang/cargo/pull/9596)
ff3155db
EH
674- Handle "jobs = 0" case in cargo config files
675 [#9584](https://github.com/rust-lang/cargo/pull/9584)
676- Implement warning for ignored trailing arguments after `--`
677 [#9561](https://github.com/rust-lang/cargo/pull/9561)
678- Fixed rustc/rustdoc config values to be config-relative.
679 [#9566](https://github.com/rust-lang/cargo/pull/9566)
680- `cargo fix` now supports rustc's suggestions with multiple spans.
681 [#9567](https://github.com/rust-lang/cargo/pull/9567)
570107f8
EH
682- `cargo fix` now fixes each target serially instead of in parallel to avoid
683 problems with fixing the same file concurrently.
684 [#9677](https://github.com/rust-lang/cargo/pull/9677)
685- Changes to the target `linker` config value now trigger a rebuild.
686 [#9647](https://github.com/rust-lang/cargo/pull/9647)
687- Git unstaged deleted files are now ignored when using the `--allow-dirty`
688 flag with `cargo publish` or `cargo package`.
689 [#9645](https://github.com/rust-lang/cargo/pull/9645)
ff3155db
EH
690
691### Nightly only
692
693- Enabled support for `cargo fix --edition` for 2021.
694 [#9588](https://github.com/rust-lang/cargo/pull/9588)
570107f8
EH
695- Several changes to named profiles.
696 [#9685](https://github.com/rust-lang/cargo/pull/9685)
697- Extended instructions on what to do when running `cargo fix --edition` on
698 the 2021 edition.
699 [#9694](https://github.com/rust-lang/cargo/pull/9694)
700- Multiple updates to error messages using nightly features to help better
701 explain the situation.
702 [#9657](https://github.com/rust-lang/cargo/pull/9657)
703- Adjusted the edition 2021 resolver diff report.
704 [#9649](https://github.com/rust-lang/cargo/pull/9649)
705- Fixed error using `cargo doc --open` with `doc.extern-map`.
706 [#9531](https://github.com/rust-lang/cargo/pull/9531)
707- Unified weak and namespaced features.
708 [#9574](https://github.com/rust-lang/cargo/pull/9574)
709- Various updates to future-incompatible reporting.
710 [#9606](https://github.com/rust-lang/cargo/pull/9606)
711- `[env]` environment variables are not allowed to set vars set by Cargo.
712 [#9579](https://github.com/rust-lang/cargo/pull/9579)
ff3155db 713
b25b4087 714## Cargo 1.54 (2021-07-29)
ff3155db 715[4369396c...rust-1.54.0](https://github.com/rust-lang/cargo/compare/4369396c...rust-1.54.0)
64aa6369
EH
716
717### Added
718
b25b4087
EH
719- Fetching from a git repository (such as the crates.io index) now displays
720 the network transfer rate.
721 [#9395](https://github.com/rust-lang/cargo/pull/9395)
ff3155db
EH
722- Added `--prune` option for `cargo tree` to limit what is displayed.
723 [#9520](https://github.com/rust-lang/cargo/pull/9520)
724- Added `--depth` option for `cargo tree` to limit what is displayed.
725 [#9499](https://github.com/rust-lang/cargo/pull/9499)
726- Added `cargo tree -e no-proc-macro` to hide procedural macro dependencies.
727 [#9488](https://github.com/rust-lang/cargo/pull/9488)
728- Added `doc.browser` config option to set which browser to open with `cargo doc --open`.
729 [#9473](https://github.com/rust-lang/cargo/pull/9473)
730- Added `CARGO_TARGET_TMPDIR` environment variable set for integration tests &
731 benches. This provides a temporary or "scratch" directory in the `target`
732 directory for tests and benches to use.
733 [#9375](https://github.com/rust-lang/cargo/pull/9375)
b25b4087 734
64aa6369
EH
735### Changed
736
ff3155db
EH
737- `--features` CLI flags now provide typo suggestions with the new feature resolver.
738 [#9420](https://github.com/rust-lang/cargo/pull/9420)
739- Cargo now uses a new parser for SemVer versions. This should behave mostly
740 the same as before with some minor exceptions where invalid syntax for
741 version requirements is now rejected.
742 [#9508](https://github.com/rust-lang/cargo/pull/9508)
743- Mtime handling of `.crate` published packages has changed slightly to avoid
744 mtime values of 0. This was causing problems with lldb which refused to read
745 those files.
746 [#9517](https://github.com/rust-lang/cargo/pull/9517)
747- Improved performance of git status check in `cargo package`.
748 [#9478](https://github.com/rust-lang/cargo/pull/9478)
749- `cargo new` with fossil now places the ignore settings in the new repository
750 instead of using `fossil settings` to set them globally. This also includes
751 several other cleanups to make it more consistent with other VCS
752 configurations.
753 [#9469](https://github.com/rust-lang/cargo/pull/9469)
570107f8
EH
754- `rustc-cdylib-link-arg` applying transitively displays a warning that this
755 was not intended, and may be an error in the future.
756 [#9563](https://github.com/rust-lang/cargo/pull/9563)
ff3155db 757
b25b4087
EH
758### Fixed
759
760- Fixed `package.exclude` in `Cargo.toml` using inverted exclusions
761 (`!somefile`) when not in a git repository or when vendoring a dependency.
762 [#9186](https://github.com/rust-lang/cargo/pull/9186)
763- Dep-info files now adjust build script `rerun-if-changed` paths to be
764 absolute paths.
765 [#9421](https://github.com/rust-lang/cargo/pull/9421)
ff3155db
EH
766- Fixed a bug when with resolver = "1" non-virtual package was allowing
767 unknown features.
768 [#9437](https://github.com/rust-lang/cargo/pull/9437)
769- Fixed an issue with the index cache mishandling versions that only
770 differed in build metadata (such as `110.0.0` and `110.0.0+1.1.0f`).
771 [#9476](https://github.com/rust-lang/cargo/pull/9476)
772- Fixed `cargo install` with a semver metadata version.
773 [#9467](https://github.com/rust-lang/cargo/pull/9467)
b25b4087
EH
774
775### Nightly only
776
777- Added `report` subcommand, and changed `cargo
778 describe-future-incompatibilitie` to `cargo report
779 future-incompatibilities`.
780 [#9438](https://github.com/rust-lang/cargo/pull/9438)
ff3155db
EH
781- Added a `[host]` table to the config files to be able to set build flags for
782 host target. Also added `target-applies-to-host` to control how the
783 `[target]` tables behave.
784 [#9322](https://github.com/rust-lang/cargo/pull/9322)
785- Added some validation to build script `rustc-link-arg-*` instructions to
786 return an error if the target doesn't exist.
787 [#9523](https://github.com/rust-lang/cargo/pull/9523)
788- Added `cargo:rustc-link-arg-bin` instruction for build scripts.
789 [#9486](https://github.com/rust-lang/cargo/pull/9486)
b25b4087
EH
790
791
792## Cargo 1.53 (2021-06-17)
793[90691f2b...rust-1.53.0](https://github.com/rust-lang/cargo/compare/90691f2b...rust-1.53.0)
794
795### Added
796
797### Changed
06ccdfaf
EH
798- 🔥 Cargo now supports git repositories where the default `HEAD` branch is not
799 "master". This also includes a switch to the version 3 `Cargo.lock` format
800 which can handle default branches correctly.
801 [#9133](https://github.com/rust-lang/cargo/pull/9133)
b25b4087
EH
802 [#9397](https://github.com/rust-lang/cargo/pull/9397)
803 [#9384](https://github.com/rust-lang/cargo/pull/9384)
804 [#9392](https://github.com/rust-lang/cargo/pull/9392)
805- 🔥 macOS targets now default to `unpacked` split-debuginfo.
64aa6369
EH
806 [#9298](https://github.com/rust-lang/cargo/pull/9298)
807- ❗ The `authors` field is no longer included in `Cargo.toml` for new
808 projects.
809 [#9282](https://github.com/rust-lang/cargo/pull/9282)
810- `cargo update` may now work with the `--offline` flag.
811 [#9279](https://github.com/rust-lang/cargo/pull/9279)
06ccdfaf
EH
812- `cargo doc` will now erase the `doc` directory when switching between
813 different toolchain versions. There are shared, unversioned files (such as
814 the search index) that can become broken when using different versions.
815 [#8640](https://github.com/rust-lang/cargo/pull/8640)
b25b4087
EH
816 [#9404](https://github.com/rust-lang/cargo/pull/9404)
817- Improved error messages when path dependency/workspace member is missing.
818 [#9368](https://github.com/rust-lang/cargo/pull/9368)
64aa6369
EH
819
820### Fixed
b25b4087
EH
821- Fixed `cargo doc` detecting if the documentation needs to be rebuilt when
822 changing some settings such as features.
823 [#9419](https://github.com/rust-lang/cargo/pull/9419)
824- `cargo doc` now deletes the output directory for the package before running
825 rustdoc to clear out any stale files.
826 [#9419](https://github.com/rust-lang/cargo/pull/9419)
827- Fixed the `-C metadata` value to always include all information for all
828 builds. Previously, in some situations, the hash only included the package
829 name and version. This fixes some issues, such as incremental builds with
830 split-debuginfo on macOS corrupting the incremental cache in some cases.
831 [#9418](https://github.com/rust-lang/cargo/pull/9418)
832- Fixed man pages not working on Windows if `man` is in `PATH`.
833 [#9378](https://github.com/rust-lang/cargo/pull/9378)
834- The `rustc` cache is now aware of `RUSTC_WRAPPER` and `RUSTC_WORKSPACE_WRAPPER`.
835 [#9348](https://github.com/rust-lang/cargo/pull/9348)
836- Track the `CARGO` environment variable in the rebuild fingerprint if the
837 code uses `env!("CARGO")`.
838 [#9363](https://github.com/rust-lang/cargo/pull/9363)
64aa6369
EH
839
840### Nightly only
841- Fixed config includes not working.
842 [#9299](https://github.com/rust-lang/cargo/pull/9299)
843- Emit note when `--future-incompat-report` had nothing to report.
844 [#9263](https://github.com/rust-lang/cargo/pull/9263)
845- Error messages for nightly features flags (like `-Z` and `cargo-features`)
b25b4087 846 now provides more information.
64aa6369 847 [#9290](https://github.com/rust-lang/cargo/pull/9290)
b25b4087
EH
848- Added the ability to set the target for an individual package in `Cargo.toml`.
849 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#per-package-target)
850 [#9030](https://github.com/rust-lang/cargo/pull/9030)
851- Fixed build-std updating the index on every build.
852 [#9393](https://github.com/rust-lang/cargo/pull/9393)
853- `-Z help` now displays all the `-Z` options.
854 [#9369](https://github.com/rust-lang/cargo/pull/9369)
855- Added `-Zallow-features` to specify which nightly features are allowed to be used.
856 [#9283](https://github.com/rust-lang/cargo/pull/9283)
857- Added `cargo config` subcommand.
858 [#9302](https://github.com/rust-lang/cargo/pull/9302)
64aa6369 859
d78b873a 860## Cargo 1.52 (2021-05-06)
64aa6369 861[34170fcd...rust-1.52.0](https://github.com/rust-lang/cargo/compare/34170fcd...rust-1.52.0)
d78b873a
EH
862
863### Added
64aa6369
EH
864- Added the `"manifest_path"` field to JSON messages for a package.
865 [#9022](https://github.com/rust-lang/cargo/pull/9022)
866 [#9247](https://github.com/rust-lang/cargo/pull/9247)
d78b873a
EH
867
868### Changed
64aa6369
EH
869- Build scripts are now forbidden from setting `RUSTC_BOOTSTRAP` on stable.
870 [#9181](https://github.com/rust-lang/cargo/pull/9181)
06ccdfaf 871 [#9385](https://github.com/rust-lang/cargo/pull/9385)
64aa6369
EH
872- crates.io now supports SPDX 3.11 licenses.
873 [#9209](https://github.com/rust-lang/cargo/pull/9209)
874- An error is now reported if `CARGO_TARGET_DIR` is an empty string.
875 [#8939](https://github.com/rust-lang/cargo/pull/8939)
876- Doc tests now pass the `--message-format` flag into the test so that the
877 "short" format can now be used for doc tests.
878 [#9128](https://github.com/rust-lang/cargo/pull/9128)
879- `cargo test` now prints a clearer indicator of which target is currently running.
880 [#9195](https://github.com/rust-lang/cargo/pull/9195)
881- The `CARGO_TARGET_<TRIPLE>` environment variable will now issue a warning if
882 it is using lowercase letters.
883 [#9169](https://github.com/rust-lang/cargo/pull/9169)
d78b873a
EH
884
885### Fixed
64aa6369
EH
886- Fixed publication of packages with metadata and resolver fields in `Cargo.toml`.
887 [#9300](https://github.com/rust-lang/cargo/pull/9300)
888 [#9304](https://github.com/rust-lang/cargo/pull/9304)
889- Fixed logic for determining prefer-dynamic for a dylib which differed in a
890 workspace vs a single package.
891 [#9252](https://github.com/rust-lang/cargo/pull/9252)
892- Fixed an issue where exclusive target-specific dependencies that overlapped
893 across dependency kinds (like regular and build-dependencies) would
894 incorrectly include the dependencies in both.
895 [#9255](https://github.com/rust-lang/cargo/pull/9255)
896- Fixed panic with certain styles of Package IDs when passed to the `-p` flag.
897 [#9188](https://github.com/rust-lang/cargo/pull/9188)
898- When running cargo with output not going to a TTY, and with the progress bar
899 and color force-enabled, the output will now correctly clear the progress
900 line.
901 [#9231](https://github.com/rust-lang/cargo/pull/9231)
902- Error instead of panic when JSON may contain non-utf8 paths.
903 [#9226](https://github.com/rust-lang/cargo/pull/9226)
904- Fixed a hang that can happen on broken stderr.
905 [#9201](https://github.com/rust-lang/cargo/pull/9201)
906- Fixed thin-local LTO not being disabled correctly when `lto=off` is set.
907 [#9182](https://github.com/rust-lang/cargo/pull/9182)
d78b873a
EH
908
909### Nightly only
910- The `strip` profile option now supports `true` and `false` values.
911 [#9153](https://github.com/rust-lang/cargo/pull/9153)
64aa6369
EH
912- `cargo fix --edition` now displays a report when switching to 2021 if the
913 new resolver changes features.
914 [#9268](https://github.com/rust-lang/cargo/pull/9268)
915- Added `[patch]` table support in `.cargo/config` files.
916 [#9204](https://github.com/rust-lang/cargo/pull/9204)
917- Added `cargo describe-future-incompatibilities` for generating a report on
918 dependencies that contain future-incompatible warnings.
919 [#8825](https://github.com/rust-lang/cargo/pull/8825)
920- Added easier support for testing the 2021 edition.
921 [#9184](https://github.com/rust-lang/cargo/pull/9184)
922- Switch the default resolver to "2" in the 2021 edition.
923 [#9184](https://github.com/rust-lang/cargo/pull/9184)
924- `cargo fix --edition` now supports 2021.
925 [#9184](https://github.com/rust-lang/cargo/pull/9184)
926- Added `--print` flag to `cargo rustc` to pass along to `rustc` to display
927 information from rustc.
928 [#9002](https://github.com/rust-lang/cargo/pull/9002)
929- Added `-Zdoctest-in-workspace` for changing the directory where doctests are
930 *run* versus where they are *compiled*.
931 [#9105](https://github.com/rust-lang/cargo/pull/9105)
932- Added support for an `[env]` section in `.cargo/config.toml` to set
933 environment variables when running cargo.
934 [#9175](https://github.com/rust-lang/cargo/pull/9175)
935- Added a schema field and `features2` field to the index.
936 [#9161](https://github.com/rust-lang/cargo/pull/9161)
937- Changes to JSON spec targets will now trigger a rebuild.
938 [#9223](https://github.com/rust-lang/cargo/pull/9223)
d78b873a 939
5168b7e3 940## Cargo 1.51 (2021-03-25)
d78b873a 941[75d5d8cf...rust-1.51.0](https://github.com/rust-lang/cargo/compare/75d5d8cf...rust-1.51.0)
5168b7e3
EH
942
943### Added
d78b873a
EH
944- 🔥 Added the `split-debuginfo` profile option.
945 [docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#split-debuginfo)
946 [#9112](https://github.com/rust-lang/cargo/pull/9112)
947- Added the `path` field to `cargo metadata` for the package dependencies list
948 to show the path for "path" dependencies.
949 [#8994](https://github.com/rust-lang/cargo/pull/8994)
950- 🔥 Added a new feature resolver, and new CLI feature flag behavior. See the
951 new [features](https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2)
952 and [resolver](https://doc.rust-lang.org/nightly/cargo/reference/resolver.html#feature-resolver-version-2)
953 documentation for the `resolver = "2"` option. See the
954 [CLI](https://doc.rust-lang.org/nightly/cargo/reference/features.html#command-line-feature-options)
955 and [resolver 2 CLI](https://doc.rust-lang.org/nightly/cargo/reference/features.html#resolver-version-2-command-line-flags)
956 options for the new CLI behavior. And, finally, see
957 [RFC 2957](https://github.com/rust-lang/rfcs/blob/master/text/2957-cargo-features2.md)
958 for a detailed look at what has changed.
959 [#8997](https://github.com/rust-lang/cargo/pull/8997)
5168b7e3
EH
960
961### Changed
d78b873a
EH
962- `cargo install --locked` now emits a warning if `Cargo.lock` is not found.
963 [#9108](https://github.com/rust-lang/cargo/pull/9108)
964- Unknown or ambiguous package IDs passed on the command-line now display
965 suggestions for the correct package ID.
966 [#9095](https://github.com/rust-lang/cargo/pull/9095)
967- Slightly optimize `cargo vendor`
968 [#8937](https://github.com/rust-lang/cargo/pull/8937)
969 [#9131](https://github.com/rust-lang/cargo/pull/9131)
970 [#9132](https://github.com/rust-lang/cargo/pull/9132)
5168b7e3
EH
971
972### Fixed
d78b873a
EH
973- Fixed environment variables and cfg settings emitted by a build script that
974 are set for `cargo test` and `cargo run` when the build script runs multiple
975 times during the same build session.
976 [#9122](https://github.com/rust-lang/cargo/pull/9122)
977- Fixed a panic with `cargo doc` and the new feature resolver. This also
978 introduces some heuristics to try to avoid path collisions with `rustdoc` by
979 only documenting one variant of a package if there are multiple (such as
980 multiple versions, or the same package shared for host and target
981 platforms).
982 [#9077](https://github.com/rust-lang/cargo/pull/9077)
983- Fixed a bug in Cargo's cyclic dep graph detection that caused a stack
984 overflow.
985 [#9075](https://github.com/rust-lang/cargo/pull/9075)
986- Fixed build script `links` environment variables (`DEP_*`) not showing up
987 for testing packages in some cases.
988 [#9065](https://github.com/rust-lang/cargo/pull/9065)
989- Fixed features being selected in a nondeterministic way for a specific
990 scenario when building an entire workspace with all targets with a
991 proc-macro in the workspace with `resolver="2"`.
992 [#9059](https://github.com/rust-lang/cargo/pull/9059)
993- Fixed to use `http.proxy` setting in `~/.gitconfig`.
994 [#8986](https://github.com/rust-lang/cargo/pull/8986)
64aa6369
EH
995- Fixed --feature pkg/feat for V1 resolver for non-member.
996 [#9275](https://github.com/rust-lang/cargo/pull/9275)
997 [#9277](https://github.com/rust-lang/cargo/pull/9277)
998- Fixed panic in `cargo doc` when there are colliding output filenames in a workspace.
999 [#9276](https://github.com/rust-lang/cargo/pull/9276)
1000 [#9277](https://github.com/rust-lang/cargo/pull/9277)
1001- Fixed `cargo install` from exiting with success if one of several packages
1002 did not install successfully.
1003 [#9185](https://github.com/rust-lang/cargo/pull/9185)
1004 [#9196](https://github.com/rust-lang/cargo/pull/9196)
1005- Fix panic with doc collision orphan.
1006 [#9142](https://github.com/rust-lang/cargo/pull/9142)
1007 [#9196](https://github.com/rust-lang/cargo/pull/9196)
5168b7e3
EH
1008
1009### Nightly only
d78b873a
EH
1010- Removed the `publish-lockfile` unstable feature, it was stabilized without
1011 the need for an explicit flag 1.5 years ago.
1012 [#9092](https://github.com/rust-lang/cargo/pull/9092)
1013- Added better diagnostics, help messages, and documentation for nightly
1014 features (such as those passed with the `-Z` flag, or specified with
1015 `cargo-features` in `Cargo.toml`).
1016 [#9092](https://github.com/rust-lang/cargo/pull/9092)
1017- Added support for Rust edition 2021.
1018 [#8922](https://github.com/rust-lang/cargo/pull/8922)
1019- Added support for the `rust-version` field in project metadata.
1020 [#8037](https://github.com/rust-lang/cargo/pull/8037)
64aa6369
EH
1021- Added a schema field to the index.
1022 [#9161](https://github.com/rust-lang/cargo/pull/9161)
1023 [#9196](https://github.com/rust-lang/cargo/pull/9196)
5168b7e3 1024
675fb9fc 1025## Cargo 1.50 (2021-02-11)
5168b7e3 1026[8662ab42...rust-1.50.0](https://github.com/rust-lang/cargo/compare/8662ab42...rust-1.50.0)
675fb9fc
EH
1027
1028### Added
1029- Added the `doc` field to `cargo metadata`, which indicates if a target is
1030 documented.
1031 [#8869](https://github.com/rust-lang/cargo/pull/8869)
5168b7e3
EH
1032- Added `RUSTC_WORKSPACE_WRAPPER`, an alternate RUSTC wrapper that only runs
1033 for the local workspace packages, and caches its artifacts independently of
1034 non-wrapped builds.
1035 [#8976](https://github.com/rust-lang/cargo/pull/8976)
1036- Added `--workspace` to `cargo update` to update only the workspace members,
1037 and not their dependencies. This is particularly useful if you update the
1038 version in `Cargo.toml` and want to update `Cargo.lock` without running any
1039 other commands.
1040 [#8725](https://github.com/rust-lang/cargo/pull/8725)
675fb9fc
EH
1041
1042### Changed
1043- `.crate` files uploaded to a registry are now built with reproducible
1044 settings, so that the same `.crate` file created on different machines
1045 should be identical.
1046 [#8864](https://github.com/rust-lang/cargo/pull/8864)
5168b7e3
EH
1047- Git dependencies that specify more than one of `branch`, `tag`, or `rev` are
1048 now rejected.
1049 [#8984](https://github.com/rust-lang/cargo/pull/8984)
1050- The `rerun-if-changed` build script directive can now point to a directory,
1051 in which case Cargo will check if any file in that directory changes.
1052 [#8973](https://github.com/rust-lang/cargo/pull/8973)
5168b7e3
EH
1053- If Cargo cannot determine the username or email address, `cargo new` will no
1054 longer fail, and instead create an empty authors list.
1055 [#8912](https://github.com/rust-lang/cargo/pull/8912)
5168b7e3
EH
1056- The progress bar width has been reduced to provide more room to display the
1057 crates currently being built.
1058 [#8892](https://github.com/rust-lang/cargo/pull/8892)
1059- `cargo new` will now support `includeIf` directives in `.gitconfig` to match
1060 the correct directory when determining the username and email address.
1061 [#8886](https://github.com/rust-lang/cargo/pull/8886)
675fb9fc
EH
1062
1063### Fixed
5168b7e3
EH
1064- Fixed `cargo metadata` and `cargo tree` to only download packages for the
1065 requested target.
1066 [#8987](https://github.com/rust-lang/cargo/pull/8987)
1067- Updated libgit2, which brings in many fixes, particularly fixing a zlib
1068 error that occasionally appeared on 32-bit systems.
1069 [#8998](https://github.com/rust-lang/cargo/pull/8998)
1070- Fixed stack overflow with a circular dev-dependency that uses the `links`
1071 field.
1072 [#8969](https://github.com/rust-lang/cargo/pull/8969)
1073- Fixed `cargo publish` failing on some filesystems, particularly 9p on WSL2.
1074 [#8950](https://github.com/rust-lang/cargo/pull/8950)
675fb9fc
EH
1075
1076### Nightly only
1077- Allow `resolver="1"` to specify the original feature resolution behavior.
1078 [#8857](https://github.com/rust-lang/cargo/pull/8857)
1079- Added `-Z extra-link-arg` which adds the `cargo:rustc-link-arg-bins`
1080 and `cargo:rustc-link-arg` build script options.
1081 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#extra-link-arg)
1082 [#8441](https://github.com/rust-lang/cargo/pull/8441)
5168b7e3
EH
1083- Implemented external credential process support, and added `cargo logout`.
1084 ([RFC 2730](https://github.com/rust-lang/rfcs/blob/master/text/2730-cargo-token-from-process.md))
1085 ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process))
1086 [#8934](https://github.com/rust-lang/cargo/pull/8934)
1087- Fix panic with `-Zbuild-std` and no roots.
1088 [#8942](https://github.com/rust-lang/cargo/pull/8942)
1089- Set docs.rs as the default extern-map for crates.io
1090 [#8877](https://github.com/rust-lang/cargo/pull/8877)
675fb9fc 1091
06786a87 1092## Cargo 1.49 (2020-12-31)
675fb9fc 1093[75615f8e...rust-1.49.0](https://github.com/rust-lang/cargo/compare/75615f8e...rust-1.49.0)
06786a87
EH
1094
1095### Added
1096- Added `homepage` and `documentation` fields to `cargo metadata`.
1097 [#8744](https://github.com/rust-lang/cargo/pull/8744)
675fb9fc
EH
1098- Added the `CARGO_PRIMARY_PACKAGE` environment variable which is set when
1099 running `rustc` if the package is one of the "root" packages selected on the
1100 command line.
1101 [#8758](https://github.com/rust-lang/cargo/pull/8758)
1102- Added support for Unix-style glob patterns for package and target selection
1103 flags on the command-line (such as `-p 'serde*'` or `--test '*'`).
1104 [#8752](https://github.com/rust-lang/cargo/pull/8752)
06786a87
EH
1105
1106### Changed
1107- Computed LTO flags are now included in the filename metadata hash so that
1108 changes in LTO settings will independently cache build artifacts instead of
1109 overwriting previous ones. This prevents rebuilds in some situations such as
1110 switching between `cargo build` and `cargo test` in some circumstances.
1111 [#8755](https://github.com/rust-lang/cargo/pull/8755)
675fb9fc
EH
1112- `cargo tree` now displays `(proc-macro)` next to proc-macro packages.
1113 [#8765](https://github.com/rust-lang/cargo/pull/8765)
1114- Added a warning that the allowed characters for a feature name have been
1115 restricted to letters, digits, `_`, `-`, and `+` to accommodate future
1116 syntax changes. This is still a superset of the allowed syntax on crates.io,
1117 which requires ASCII. This is intended to be changed to an error in the
1118 future.
1119 [#8814](https://github.com/rust-lang/cargo/pull/8814)
1120- `-p` without a value will now print a list of workspace package names.
1121 [#8808](https://github.com/rust-lang/cargo/pull/8808)
d78b873a
EH
1122- Add period to allowed feature name characters.
1123 [#8932](https://github.com/rust-lang/cargo/pull/8932)
1124 [#8943](https://github.com/rust-lang/cargo/pull/8943)
06786a87
EH
1125
1126### Fixed
1127- Fixed building a library with both "dylib" and "rlib" crate types with LTO enabled.
1128 [#8754](https://github.com/rust-lang/cargo/pull/8754)
675fb9fc
EH
1129- Fixed paths in Cargo's dep-info files.
1130 [#8819](https://github.com/rust-lang/cargo/pull/8819)
1131- Fixed inconsistent source IDs in `cargo metadata` for git dependencies that
1132 explicitly specify `branch="master"`.
1133 [#8824](https://github.com/rust-lang/cargo/pull/8824)
1134- Fixed re-extracting dependencies which contained a `.cargo-ok` file.
1135 [#8835](https://github.com/rust-lang/cargo/pull/8835)
06786a87
EH
1136
1137### Nightly only
675fb9fc
EH
1138- Fixed a panic with `cargo doc -Zfeatures=itarget` in some situations.
1139 [#8777](https://github.com/rust-lang/cargo/pull/8777)
1140- New implementation for namespaced features, using the syntax `dep:serde`.
1141 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#namespaced-features)
1142 [#8799](https://github.com/rust-lang/cargo/pull/8799)
1143- Added support for "weak" dependency features, using the syntax
1144 `dep_name?/feat_name`, which will enable a feature for a dependency without
1145 also enabling the dependency.
1146 [#8818](https://github.com/rust-lang/cargo/pull/8818)
1147- Fixed the new feature resolver downloading extra dependencies that weren't
1148 strictly necessary.
1149 [#8823](https://github.com/rust-lang/cargo/pull/8823)
06786a87 1150
f6096240 1151## Cargo 1.48 (2020-11-19)
06786a87 1152[51b66125...rust-1.48.0](https://github.com/rust-lang/cargo/compare/51b66125...rust-1.48.0)
f6096240
EH
1153
1154### Added
06786a87
EH
1155- Added `term.progress` configuration option to control when and how the
1156 progress bar is displayed.
1157 [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#termprogresswhen)
1158 [#8165](https://github.com/rust-lang/cargo/pull/8165)
1159- Added `--message-format plain` option to `cargo locate-project` to display
1160 the project location without JSON to make it easier to use in a script.
1161 [#8707](https://github.com/rust-lang/cargo/pull/8707)
1162- Added `--workspace` option to `cargo locate-project` to display the path to
1163 the workspace manifest.
1164 [#8712](https://github.com/rust-lang/cargo/pull/8712)
1165- A new contributor guide has been added for contributing to Cargo itself.
1166 This is published at <https://rust-lang.github.io/cargo/contrib/>.
1167 [#8715](https://github.com/rust-lang/cargo/pull/8715)
1168- Zsh `--target` completion will now complete with the built-in rustc targets.
1169 [#8740](https://github.com/rust-lang/cargo/pull/8740)
f6096240
EH
1170
1171### Changed
1172
1173### Fixed
06786a87
EH
1174- Fixed `cargo new` creating a fossil repository to properly ignore the `target` directory.
1175 [#8671](https://github.com/rust-lang/cargo/pull/8671)
1176- Don't show warnings about the workspace in the current directory when using `cargo install`
1177 of a remote package.
1178 [#8681](https://github.com/rust-lang/cargo/pull/8681)
1179- Automatically reinitialize the index when an "Object not found" error is
1180 encountered in the git repository.
1181 [#8735](https://github.com/rust-lang/cargo/pull/8735)
675fb9fc
EH
1182- Updated libgit2, which brings in several fixes for git repository handling.
1183 [#8778](https://github.com/rust-lang/cargo/pull/8778)
1184 [#8780](https://github.com/rust-lang/cargo/pull/8780)
f6096240
EH
1185
1186### Nightly only
06786a87
EH
1187- Fixed `cargo install` so that it will ignore the `[unstable]` table in local config files.
1188 [#8656](https://github.com/rust-lang/cargo/pull/8656)
1189- Fixed nondeterministic behavior of the new feature resolver.
1190 [#8701](https://github.com/rust-lang/cargo/pull/8701)
1191- Fixed running `cargo test` on a proc-macro with the new feature resolver
1192 under a specific combination of circumstances.
1193 [#8742](https://github.com/rust-lang/cargo/pull/8742)
f6096240 1194
3b661a90 1195## Cargo 1.47 (2020-10-08)
f6096240 1196[4f74d9b2...rust-1.47.0](https://github.com/rust-lang/cargo/compare/4f74d9b2...rust-1.47.0)
3b661a90
EH
1197
1198### Added
f6096240
EH
1199- `cargo doc` will now include the package's version in the left sidebar.
1200 [#8509](https://github.com/rust-lang/cargo/pull/8509)
1201- Added the `test` field to `cargo metadata` targets.
1202 [#8478](https://github.com/rust-lang/cargo/pull/8478)
1203- Cargo's man pages are now displayed via the `cargo help` command (such as
1204 `cargo help build`).
1205 [#8456](https://github.com/rust-lang/cargo/pull/8456)
1206 [#8577](https://github.com/rust-lang/cargo/pull/8577)
1207- Added new documentation chapters on [how dependency resolution
1208 works](https://doc.rust-lang.org/nightly/cargo/reference/resolver.html) and
1209 [SemVer
1210 compatibility](https://doc.rust-lang.org/nightly/cargo/reference/semver.html),
1211 along with suggestions on how to version your project and work with
1212 dependencies.
1213 [#8609](https://github.com/rust-lang/cargo/pull/8609)
3b661a90
EH
1214
1215### Changed
1216- The comments added to `.gitignore` when it is modified have been tweaked to
1217 add some spacing.
1218 [#8476](https://github.com/rust-lang/cargo/pull/8476)
1219- `cargo metadata` output should now be sorted to be deterministic.
1220 [#8489](https://github.com/rust-lang/cargo/pull/8489)
1221- By default, build scripts and proc-macros are now built with `opt-level=0`
1222 and the default codegen units, even in release mode.
1223 [#8500](https://github.com/rust-lang/cargo/pull/8500)
f6096240
EH
1224- `workspace.default-members` is now filtered by `workspace.exclude`.
1225 [#8485](https://github.com/rust-lang/cargo/pull/8485)
1226- `workspace.members` globs now ignore non-directory paths.
1227 [#8511](https://github.com/rust-lang/cargo/pull/8511)
1228- git zlib errors now trigger a retry.
1229 [#8520](https://github.com/rust-lang/cargo/pull/8520)
1230- "http" class git errors now trigger a retry.
1231 [#8553](https://github.com/rust-lang/cargo/pull/8553)
1232- git dependencies now override the `core.autocrlf` git configuration value to
1233 ensure they behave consistently across platforms, particularly when
1234 vendoring git dependencies on Windows.
1235 [#8523](https://github.com/rust-lang/cargo/pull/8523)
1236- If `Cargo.lock` needs to be updated, then it will be automatically
1237 transitioned to the new V2 format. This format removes the `[metadata]`
1238 table, and should be easier to merge changes in source control systems. This
1239 format was introduced in 1.38, and made the default for new projects in
1240 1.41.
1241 [#8554](https://github.com/rust-lang/cargo/pull/8554)
1242- Added preparation for support of git repositories with a non-"master"
1243 default branch. Actual support will arrive in a future version. This
1244 introduces some warnings:
1245 - Warn if a git dependency does not specify a branch, and the default branch
1246 on the repository is not "master". In the future, Cargo will fetch the
1247 default branch. In this scenario, the branch should be explicitly
1248 specified.
1249 - Warn if a workspace has multiple dependencies to the same git repository,
1250 one without a `branch` and one with `branch="master"`. Dependencies should
1251 all use one form or the other.
1252 [#8522](https://github.com/rust-lang/cargo/pull/8522)
1253- Warnings are now issued if a `required-features` entry lists a feature that
1254 does not exist.
1255 [#7950](https://github.com/rust-lang/cargo/pull/7950)
1256- Built-in aliases are now included in `cargo --list`.
1257 [#8542](https://github.com/rust-lang/cargo/pull/8542)
1258- `cargo install` with a specific version that has been yanked will now
1259 display an error message that it has been yanked, instead of "could not
1260 find".
1261 [#8565](https://github.com/rust-lang/cargo/pull/8565)
1262- `cargo publish` with a package that has the `publish` field set to a single
1263 registry, and no `--registry` flag has been given, will now publish to that
1264 registry instead of generating an error.
1265 [#8571](https://github.com/rust-lang/cargo/pull/8571)
3b661a90
EH
1266
1267### Fixed
1268- Fixed issue where if a project directory was moved, and one of the
1269 build scripts did not use the `rerun-if-changed` directive, then that
1270 build script was being rebuilt when it shouldn't.
1271 [#8497](https://github.com/rust-lang/cargo/pull/8497)
f6096240
EH
1272- Console colors should now work on Windows 7 and 8.
1273 [#8540](https://github.com/rust-lang/cargo/pull/8540)
1274- The `CARGO_TARGET_{triplet}_RUNNER` environment variable will now correctly
1275 override the config file instead of trying to merge the commands.
1276 [#8629](https://github.com/rust-lang/cargo/pull/8629)
06786a87
EH
1277- Fixed LTO with doctests.
1278 [#8657](https://github.com/rust-lang/cargo/pull/8657)
1279 [#8658](https://github.com/rust-lang/cargo/pull/8658)
3b661a90
EH
1280
1281### Nightly only
1282- Added support for `-Z terminal-width` which tells `rustc` the width of the
1283 terminal so that it can format diagnostics better.
1284 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#terminal-width)
1285 [#8427](https://github.com/rust-lang/cargo/pull/8427)
1286- Added ability to configure `-Z` unstable flags in config files via the
1287 `[unstable]` table.
1288 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html)
1289 [#8393](https://github.com/rust-lang/cargo/pull/8393)
f6096240
EH
1290- Added `-Z build-std-features` flag to set features for the standard library.
1291 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std-features)
3b661a90
EH
1292 [#8490](https://github.com/rust-lang/cargo/pull/8490)
1293
2011649f 1294## Cargo 1.46 (2020-08-27)
3b661a90 1295[9fcb8c1d...rust-1.46.0](https://github.com/rust-lang/cargo/compare/9fcb8c1d...rust-1.46.0)
2011649f
EH
1296
1297### Added
3b661a90
EH
1298- The `dl` key in `config.json` of a registry index now supports the
1299 replacement markers `{prefix}` and `{lowerprefix}` to allow spreading crates
1300 across directories similar to how the index itself is structured.
1301 [docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format)
1302 [#8267](https://github.com/rust-lang/cargo/pull/8267)
1303- Added new environment variables that are set during compilation:
1304 - `CARGO_CRATE_NAME`: The name of the crate being built.
1305 - `CARGO_BIN_NAME`: The name of the executable binary (if this is a binary crate).
1306 - `CARGO_PKG_LICENSE`: The `license` field from the manifest.
1307 - `CARGO_PKG_LICENSE_FILE`: The `license-file` field from the manifest.
1308 [#8270](https://github.com/rust-lang/cargo/pull/8270)
1309 [#8325](https://github.com/rust-lang/cargo/pull/8325)
1310 [#8387](https://github.com/rust-lang/cargo/pull/8387)
1311- If the value for `readme` is not specified in `Cargo.toml`, it is now
1312 automatically inferred from the existence of a file named `README`,
1313 `README.md`, or `README.txt`. This can be suppressed by setting
1314 `readme = false`.
1315 [#8277](https://github.com/rust-lang/cargo/pull/8277)
1316- `cargo install` now supports the `--index` flag to install directly from an index.
1317 [#8344](https://github.com/rust-lang/cargo/pull/8344)
1318- Added the `metadata` table to the `workspace` definition in `Cargo.toml`.
1319 This can be used for arbitrary data similar to the `package.metadata` table.
1320 [#8323](https://github.com/rust-lang/cargo/pull/8323)
1321- Added the `--target-dir` flag to `cargo install` to set the target directory.
1322 [#8391](https://github.com/rust-lang/cargo/pull/8391)
1323- Changes to environment variables used by the
1324 [`env!`](https://doc.rust-lang.org/std/macro.env.html) or
1325 [`option_env!`](https://doc.rust-lang.org/std/macro.option_env.html) macros
1326 are now automatically detected to trigger a rebuild.
1327 [#8421](https://github.com/rust-lang/cargo/pull/8421)
1328- The `target` directory now includes the `CACHEDIR.TAG` file which is used by
1329 some tools to exclude the directory from backups.
1330 [#8378](https://github.com/rust-lang/cargo/pull/8378)
1331- Added docs about rustup's `+toolchain` syntax.
1332 [#8455](https://github.com/rust-lang/cargo/pull/8455)
2011649f
EH
1333
1334### Changed
1335- A warning is now displayed if a git dependency includes a `#` fragment in
1336 the URL. This was potentially confusing because Cargo itself displays git
1337 URLs with this syntax, but it does not have any meaning outside of the
1338 `Cargo.lock` file, and would not work properly.
1339 [#8297](https://github.com/rust-lang/cargo/pull/8297)
3b661a90
EH
1340- Various optimizations and fixes for bitcode embedding and LTO.
1341 [#8349](https://github.com/rust-lang/cargo/pull/8349)
1342- Reduced the amount of data fetched for git dependencies. If Cargo knows the
1343 branch or tag to fetch, it will now only fetch that branch or tag instead of
1344 all branches and tags.
1345 [#8363](https://github.com/rust-lang/cargo/pull/8363)
1346- Enhanced git fetch error messages.
1347 [#8409](https://github.com/rust-lang/cargo/pull/8409)
1348- `.crate` files are now generated with GNU tar format instead of UStar, which
1349 supports longer file names.
1350 [#8453](https://github.com/rust-lang/cargo/pull/8453)
2011649f
EH
1351
1352### Fixed
1353- Fixed a rare situation where an update to `Cargo.lock` failed once, but then
1354 subsequent runs allowed it proceed.
1355 [#8274](https://github.com/rust-lang/cargo/pull/8274)
1356- Removed assertion that Windows dylibs must have a `.dll` extension. Some
1357 custom JSON spec targets may change the extension.
1358 [#8310](https://github.com/rust-lang/cargo/pull/8310)
1359- Updated libgit2, which brings in a fix for zlib errors for some remote
1360 git servers like googlesource.com.
1361 [#8320](https://github.com/rust-lang/cargo/pull/8320)
3b661a90
EH
1362- Fixed the GitHub fast-path check for up-to-date git dependencies on
1363 non-master branches.
1364 [#8363](https://github.com/rust-lang/cargo/pull/8363)
1365- Fixed issue when enabling a feature with `pkg/feature` syntax, and `pkg` is
1366 an optional dependency, but also a dev-dependency, and the dev-dependency
1367 appears before the optional normal dependency in the registry summary, then
1368 the optional dependency would not get activated.
1369 [#8395](https://github.com/rust-lang/cargo/pull/8395)
1370- Fixed `clean -p` deleting the build directory if there is a test named
1371 `build`.
1372 [#8398](https://github.com/rust-lang/cargo/pull/8398)
1373- Fixed indentation of multi-line Cargo error messages.
1374 [#8409](https://github.com/rust-lang/cargo/pull/8409)
1375- Fixed issue where the automatic inclusion of the `--document-private-items`
1376 flag for rustdoc would override any flags passed to the `cargo rustdoc`
1377 command.
1378 [#8449](https://github.com/rust-lang/cargo/pull/8449)
1379- Cargo will now include a version in the hash of the fingerprint directories
1380 to support backwards-incompatible changes to the fingerprint structure.
1381 [#8473](https://github.com/rust-lang/cargo/pull/8473)
1382 [#8488](https://github.com/rust-lang/cargo/pull/8488)
2011649f
EH
1383
1384### Nightly only
1385- Added `-Zrustdoc-map` feature which provides external mappings for rustdoc
1386 (such as https://docs.rs/ links).
1387 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-map)
1388 [#8287](https://github.com/rust-lang/cargo/pull/8287)
1389- Fixed feature calculation when a proc-macro is declared in `Cargo.toml` with
1390 an underscore (like `proc_macro = true`).
1391 [#8319](https://github.com/rust-lang/cargo/pull/8319)
3b661a90
EH
1392- Added support for setting `-Clinker` with `-Zdoctest-xcompile`.
1393 [#8359](https://github.com/rust-lang/cargo/pull/8359)
1394- Fixed setting the `strip` profile field in config files.
1395 [#8454](https://github.com/rust-lang/cargo/pull/8454)
2011649f 1396
1bea5f60 1397## Cargo 1.45 (2020-07-16)
2011649f 1398[ebda5065e...rust-1.45.0](https://github.com/rust-lang/cargo/compare/ebda5065...rust-1.45.0)
1bea5f60
EH
1399
1400### Added
1401
1402### Changed
1403- Changed official documentation to recommend `.cargo/config.toml` filenames
1404 (with the `.toml` extension). `.toml` extension support was added in 1.39.
1405 [#8121](https://github.com/rust-lang/cargo/pull/8121)
1406- The `registry.index` config value is no longer allowed (it has been
1407 deprecated for 4 years).
1408 [#7973](https://github.com/rust-lang/cargo/pull/7973)
1409- An error is generated if both `--index` and `--registry` are passed
1410 (previously `--index` was silently ignored).
1411 [#7973](https://github.com/rust-lang/cargo/pull/7973)
1412- The `registry.token` config value is no longer used with the `--index` flag.
1413 This is intended to avoid potentially leaking the crates.io token to another
1414 registry.
1415 [#7973](https://github.com/rust-lang/cargo/pull/7973)
1416- Added a warning if `registry.token` is used with source replacement. It is
1417 intended this will be an error in future versions.
1418 [#7973](https://github.com/rust-lang/cargo/pull/7973)
1419- Windows GNU targets now copy `.dll.a` import library files for DLL crate
1420 types to the output directory.
1421 [#8141](https://github.com/rust-lang/cargo/pull/8141)
3b3ca095
EH
1422- Dylibs for all dependencies are now unconditionally copied to the output
1423 directory. Some obscure scenarios can cause an old dylib to be referenced
1424 between builds, and this ensures that all the latest copies are used.
1425 [#8139](https://github.com/rust-lang/cargo/pull/8139)
2011649f
EH
1426- `package.exclude` can now match directory names. If a directory is
1427 specified, the entire directory will be excluded, and Cargo will not attempt
1428 to inspect it further. Previously Cargo would try to check every file in the
1429 directory which could cause problems if the directory contained unreadable
1430 files.
1431 [#8095](https://github.com/rust-lang/cargo/pull/8095)
1432- When packaging with `cargo publish` or `cargo package`, Cargo can use git to
1433 guide its decision on which files to include. Previously this git-based
1434 logic required a `Cargo.toml` file to exist at the root of the repository.
1435 This is no longer required, so Cargo will now use git-based guidance even if
1436 there is not a `Cargo.toml` in the root of the repository.
1437 [#8095](https://github.com/rust-lang/cargo/pull/8095)
1438- While unpacking a crate on Windows, if it fails to write a file because the
1439 file is a reserved Windows filename (like "aux.rs"), Cargo will display an
1440 extra message to explain why it failed.
1441 [#8136](https://github.com/rust-lang/cargo/pull/8136)
1442- Failures to set mtime on files are now ignored. Some filesystems did not
1443 support this.
1444 [#8185](https://github.com/rust-lang/cargo/pull/8185)
1445- Certain classes of git errors will now recommend enabling
1446 `net.git-fetch-with-cli`.
1447 [#8166](https://github.com/rust-lang/cargo/pull/8166)
1448- When doing an LTO build, Cargo will now instruct rustc not to perform
1449 codegen when possible. This may result in a faster build and use less disk
1450 space. Additionally, for non-LTO builds, Cargo will instruct rustc to not
1451 embed LLVM bitcode in libraries, which should decrease their size.
1452 [#8192](https://github.com/rust-lang/cargo/pull/8192)
1453 [#8226](https://github.com/rust-lang/cargo/pull/8226)
1454 [#8254](https://github.com/rust-lang/cargo/pull/8254)
1455- The implementation for `cargo clean -p` has been rewritten so that it can
1456 more accurately remove the files for a specific package.
1457 [#8210](https://github.com/rust-lang/cargo/pull/8210)
1458- The way Cargo computes the outputs from a build has been rewritten to be
1459 more complete and accurate. Newly tracked files will be displayed in JSON
1460 messages, and may be uplifted to the output directory in some cases. Some of
1461 the changes from this are:
1462
1463 - `.exp` export files on Windows MSVC dynamic libraries are now tracked.
1464 - Proc-macros on Windows track import/export files.
1465 - All targets (like tests, etc.) that generate separate debug files
1466 (pdb/dSYM) are tracked.
1467 - Added .map files for wasm32-unknown-emscripten.
1468 - macOS dSYM directories are tracked for all dynamic libraries
1469 (dylib/cdylib/proc-macro) and for build scripts.
1470
1471 There are a variety of other changes as a consequence of this:
1472
1473 - Binary examples on Windows MSVC with a hyphen will now show up twice in
1474 the examples directory (`foo_bar.exe` and `foo-bar.exe`). Previously Cargo
1475 just renamed the file instead of hard-linking it.
1476 - Example libraries now follow the same rules for hyphen/underscore
1477 translation as normal libs (they will now use underscores).
1478
1479 [#8210](https://github.com/rust-lang/cargo/pull/8210)
1480- Cargo attempts to scrub any secrets from the debug log for HTTP debugging.
1481 [#8222](https://github.com/rust-lang/cargo/pull/8222)
1482- Context has been added to many of Cargo's filesystem operations, so that
1483 error messages now provide more information, such as the path that caused
1484 the problem.
1485 [#8232](https://github.com/rust-lang/cargo/pull/8232)
1486- Several commands now ignore the error if stdout or stderr is closed while it
1487 is running. For example `cargo install --list | grep -q cargo-fuzz` would
1488 previously sometimes panic because `grep -q` may close stdout before the
1489 command finishes. Regular builds continue to fail if stdout or stderr is
1490 closed, matching the behavior of many other build systems.
1491 [#8236](https://github.com/rust-lang/cargo/pull/8236)
1492- If `cargo install` is given an exact version, like `--version=1.2.3`, it
1493 will now avoid updating the index if that version is already installed, and
1494 exit quickly indicating it is already installed.
1495 [#8022](https://github.com/rust-lang/cargo/pull/8022)
1496- Changes to the `[patch]` section will now attempt to automatically update
1497 `Cargo.lock` to the new version. It should now also provide better error
1498 messages for the rare cases where it is unable to automatically update.
1499 [#8248](https://github.com/rust-lang/cargo/pull/8248)
1bea5f60
EH
1500
1501### Fixed
1502- Fixed copying Windows `.pdb` files to the output directory when the filename
1503 contained dashes.
1504 [#8123](https://github.com/rust-lang/cargo/pull/8123)
2011649f
EH
1505- Fixed error where Cargo would fail when scanning if a package is inside a
1506 git repository when any of its ancestor paths is a symlink.
1507 [#8186](https://github.com/rust-lang/cargo/pull/8186)
1508- Fixed `cargo update` with an unused `[patch]` so that it does not get
1509 stuck and refuse to update.
1510 [#8243](https://github.com/rust-lang/cargo/pull/8243)
1511- Fixed a situation where Cargo would hang if stderr is closed, and the
1512 compiler generated a large number of messages.
1513 [#8247](https://github.com/rust-lang/cargo/pull/8247)
1514- Fixed backtraces on macOS not showing filenames or line numbers. As a
1515 consequence of this, binary executables on apple targets do not include a
1516 hash in the filename in Cargo's cache. This means Cargo can only track one
1517 copy, so if you switch features or rustc versions, Cargo will need to
1518 rebuild the executable.
1519 [#8329](https://github.com/rust-lang/cargo/pull/8329)
1520 [#8335](https://github.com/rust-lang/cargo/pull/8335)
1521- Fixed fingerprinting when using lld on Windows with a dylib. Cargo was
1522 erroneously thinking the dylib was never fresh.
1523 [#8290](https://github.com/rust-lang/cargo/pull/8290)
1524 [#8335](https://github.com/rust-lang/cargo/pull/8335)
1bea5f60
EH
1525
1526### Nightly only
1527- Fixed passing the full path for `--target` to `rustdoc` when using JSON spec
1528 targets.
1529 [#8094](https://github.com/rust-lang/cargo/pull/8094)
1530- `-Cembed-bitcode=no` renamed to `-Cbitcode-in-rlib=no`
1531 [#8134](https://github.com/rust-lang/cargo/pull/8134)
1532- Added new `resolver` field to `Cargo.toml` to opt-in to the new feature
1533 resolver.
1534 [#8129](https://github.com/rust-lang/cargo/pull/8129)
2011649f
EH
1535- `-Zbuild-std` no longer treats std dependencies as "local". This means that
1536 it won't use incremental compilation for those dependencies, removes them
1537 from dep-info files, and caps lints at "allow".
1538 [#8177](https://github.com/rust-lang/cargo/pull/8177)
1539- Added `-Zmultitarget` which allows multiple `--target` flags to build the
1540 same thing for multiple targets at once.
1541 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#multitarget)
1542 [#8167](https://github.com/rust-lang/cargo/pull/8167)
1543- Added `strip` option to the profile to remove symbols and debug information.
1544 [docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-strip-option)
1545 [#8246](https://github.com/rust-lang/cargo/pull/8246)
1546- Fixed panic with `cargo tree --target=all -Zfeatures=all`.
1547 [#8269](https://github.com/rust-lang/cargo/pull/8269)
1bea5f60 1548
05fe44b2 1549## Cargo 1.44 (2020-06-04)
2011649f 1550[bda50510...rust-1.44.0](https://github.com/rust-lang/cargo/compare/bda50510...rust-1.44.0)
05fe44b2
EH
1551
1552### Added
1bea5f60
EH
1553- 🔥 Added the `cargo tree` command.
1554 [docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-tree.html)
1555 [#8062](https://github.com/rust-lang/cargo/pull/8062)
05fe44b2
EH
1556- Added warnings if a package has Windows-restricted filenames (like `nul`,
1557 `con`, `aux`, `prn`, etc.).
1558 [#7959](https://github.com/rust-lang/cargo/pull/7959)
1bea5f60
EH
1559- Added a `"build-finished"` JSON message when compilation is complete so that
1560 tools can detect when they can stop listening for JSON messages with
1561 commands like `cargo run` or `cargo test`.
1562 [#8069](https://github.com/rust-lang/cargo/pull/8069)
05fe44b2
EH
1563
1564### Changed
1565- Valid package names are now restricted to Unicode XID identifiers. This is
1566 mostly the same as before, except package names cannot start with a number
1567 or `-`.
1568 [#7959](https://github.com/rust-lang/cargo/pull/7959)
1569- `cargo new` and `init` will warn or reject additional package names
1570 (reserved Windows names, reserved Cargo directories, non-ASCII names,
1571 conflicting std names like `core`, etc.).
1572 [#7959](https://github.com/rust-lang/cargo/pull/7959)
1573- Tests are no longer hard-linked into the output directory (`target/debug/`).
1574 This ensures tools will have access to debug symbols and execute tests in
1bea5f60 1575 the same way as Cargo. Tools should use JSON messages to discover the path
05fe44b2
EH
1576 to the executable.
1577 [#7965](https://github.com/rust-lang/cargo/pull/7965)
1578- Updating git submodules now displays an "Updating" message for each
1579 submodule.
1580 [#7989](https://github.com/rust-lang/cargo/pull/7989)
1bea5f60
EH
1581- File modification times are now preserved when extracting a `.crate` file.
1582 This reverses the change made in 1.40 where the mtime was not preserved.
1583 [#7935](https://github.com/rust-lang/cargo/pull/7935)
1584- Build script warnings are now displayed separately when the build script
1585 fails.
1586 [#8017](https://github.com/rust-lang/cargo/pull/8017)
1587- Removed the `git-checkout` subcommand.
1588 [#8040](https://github.com/rust-lang/cargo/pull/8040)
1589- The progress bar is now enabled for all unix platforms. Previously it was
1590 only Linux, macOS, and FreeBSD.
1591 [#8054](https://github.com/rust-lang/cargo/pull/8054)
1592- Artifacts generated by pre-release versions of `rustc` now share the same
1593 filenames. This means that changing nightly versions will not leave stale
1594 files in the build directory.
1595 [#8073](https://github.com/rust-lang/cargo/pull/8073)
1596- Invalid package names are rejected when using renamed dependencies.
1597 [#8090](https://github.com/rust-lang/cargo/pull/8090)
1598- Added a certain class of HTTP2 errors as "spurious" that will get retried.
1599 [#8102](https://github.com/rust-lang/cargo/pull/8102)
2011649f
EH
1600- Allow `cargo package --list` to succeed, even if there are other validation
1601 errors (such as `Cargo.lock` generation problem, or missing dependencies).
1602 [#8175](https://github.com/rust-lang/cargo/pull/8175)
1603 [#8215](https://github.com/rust-lang/cargo/pull/8215)
05fe44b2
EH
1604
1605### Fixed
1606- Cargo no longer buffers excessive amounts of compiler output in memory.
1607 [#7838](https://github.com/rust-lang/cargo/pull/7838)
1608- Symbolic links in git repositories now work on Windows.
1609 [#7996](https://github.com/rust-lang/cargo/pull/7996)
1bea5f60
EH
1610- Fixed an issue where `profile.dev` was not loaded from a config file with
1611 `cargo test` when the `dev` profile was not defined in `Cargo.toml`.
1612 [#8012](https://github.com/rust-lang/cargo/pull/8012)
1613- When a binary is built as an implicit dependency of an integration test,
1614 it now checks `dep_name/feature_name` syntax in `required-features` correctly.
1615 [#8020](https://github.com/rust-lang/cargo/pull/8020)
1616- Fixed an issue where Cargo would not detect that an executable (such as an
1617 integration test) needs to be rebuilt when the previous build was
1618 interrupted with Ctrl-C.
1619 [#8087](https://github.com/rust-lang/cargo/pull/8087)
1620- Protect against some (unknown) situations where Cargo could panic when the
1621 system monotonic clock doesn't appear to be monotonic.
1622 [#8114](https://github.com/rust-lang/cargo/pull/8114)
2011649f
EH
1623- Fixed panic with `cargo clean -p` if the package has a build script.
1624 [#8216](https://github.com/rust-lang/cargo/pull/8216)
05fe44b2
EH
1625
1626### Nightly only
1627- Fixed panic with new feature resolver and required-features.
1628 [#7962](https://github.com/rust-lang/cargo/pull/7962)
1bea5f60
EH
1629- Added `RUSTC_WORKSPACE_WRAPPER` environment variable, which provides a way
1630 to wrap `rustc` for workspace members only, and affects the filename hash so
1631 that artifacts produced by the wrapper are cached separately. This usage can
1632 be seen on nightly clippy with `cargo clippy -Zunstable-options`.
1633 [#7533](https://github.com/rust-lang/cargo/pull/7533)
1634- Added `--unit-graph` CLI option to display Cargo's internal dependency graph
1635 as JSON.
1636 [#7977](https://github.com/rust-lang/cargo/pull/7977)
1637- Changed `-Zbuild_dep` to `-Zhost_dep`, and added proc-macros to the feature
1638 decoupling logic.
1639 [#8003](https://github.com/rust-lang/cargo/pull/8003)
1640 [#8028](https://github.com/rust-lang/cargo/pull/8028)
1641- Fixed so that `--crate-version` is not automatically passed when the flag
1642 is found in `RUSTDOCFLAGS`.
1643 [#8014](https://github.com/rust-lang/cargo/pull/8014)
1644- Fixed panic with `-Zfeatures=dev_dep` and `check --profile=test`.
1645 [#8027](https://github.com/rust-lang/cargo/pull/8027)
1646- Fixed panic with `-Zfeatures=itarget` with certain host dependencies.
1647 [#8048](https://github.com/rust-lang/cargo/pull/8048)
1648- Added support for `-Cembed-bitcode=no`, which provides a performance boost
1649 and disk-space usage reduction for non-LTO builds.
1650 [#8066](https://github.com/rust-lang/cargo/pull/8066)
1651- `-Zpackage-features` has been extended with several changes intended to make
1652 it easier to select features on the command-line in a workspace.
1653 [#8074](https://github.com/rust-lang/cargo/pull/8074)
05fe44b2 1654
6efd25ca 1655## Cargo 1.43 (2020-04-23)
05fe44b2 1656[9d32b7b0...rust-1.43.0](https://github.com/rust-lang/cargo/compare/9d32b7b0...rust-1.43.0)
6efd25ca
EH
1657
1658### Added
1659- 🔥 Profiles may now be specified in config files (and environment variables).
05fe44b2 1660 [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#profile)
6efd25ca 1661 [#7823](https://github.com/rust-lang/cargo/pull/7823)
05fe44b2
EH
1662- ❗ Added `CARGO_BIN_EXE_<name>` environment variable when building
1663 integration tests. This variable contains the path to any `[[bin]]` targets
1664 in the package. Integration tests should use the `env!` macro to determine
1665 the path to a binary to execute.
1666 [docs](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates)
1667 [#7697](https://github.com/rust-lang/cargo/pull/7697)
6efd25ca
EH
1668
1669### Changed
1670- `cargo install --git` now honors workspaces in a git repository. This allows
1671 workspace settings, like `[patch]`, `[replace]`, or `[profile]` to be used.
1672 [#7768](https://github.com/rust-lang/cargo/pull/7768)
05fe44b2
EH
1673- `cargo new` will now run `rustfmt` on the new files to pick up rustfmt
1674 settings like `tab_spaces` so that the new file matches the user's preferred
1675 indentation settings.
1676 [#7827](https://github.com/rust-lang/cargo/pull/7827)
1677- Environment variables printed with "very verbose" output (`-vv`) are now
1678 consistently sorted.
1679 [#7877](https://github.com/rust-lang/cargo/pull/7877)
1680- Debug logging for fingerprint rebuild-detection now includes more information.
1681 [#7888](https://github.com/rust-lang/cargo/pull/7888)
1682 [#7890](https://github.com/rust-lang/cargo/pull/7890)
1683 [#7952](https://github.com/rust-lang/cargo/pull/7952)
1684- Added warning during publish if the license-file doesn't exist.
1685 [#7905](https://github.com/rust-lang/cargo/pull/7905)
1686- The `license-file` file is automatically included during publish, even if it
1687 is not explicitly listed in the `include` list or is in a location outside
1688 of the root of the package.
1689 [#7905](https://github.com/rust-lang/cargo/pull/7905)
1690- `CARGO_CFG_DEBUG_ASSERTIONS` and `CARGO_CFG_PROC_MACRO` are no longer set
1691 when running a build script. These were inadvertently set in the past, but
1692 had no meaning as they were always true. Additionally, `cfg(proc-macro)`
1693 is no longer supported in a `target` expression.
1694 [#7943](https://github.com/rust-lang/cargo/pull/7943)
1695 [#7970](https://github.com/rust-lang/cargo/pull/7970)
6efd25ca
EH
1696
1697### Fixed
05fe44b2
EH
1698- Global command-line flags now work with aliases (like `cargo -v b`).
1699 [#7837](https://github.com/rust-lang/cargo/pull/7837)
1700- Required-features using dependency syntax (like `renamed_dep/feat_name`) now
1701 handle renamed dependencies correctly.
1702 [#7855](https://github.com/rust-lang/cargo/pull/7855)
1703- Fixed a rare situation where if a build script is run multiple times during
1704 the same build, Cargo will now keep the results separate instead of losing
1705 the output of the first execution.
1706 [#7857](https://github.com/rust-lang/cargo/pull/7857)
1707- Fixed incorrect interpretation of environment variable
1708 `CARGO_TARGET_*_RUNNER=true` as a boolean. Also improved related env var
1709 error messages.
1710 [#7891](https://github.com/rust-lang/cargo/pull/7891)
1711- Updated internal libgit2 library, bringing various fixes to git support.
1712 [#7939](https://github.com/rust-lang/cargo/pull/7939)
1713- `cargo package` / `cargo publish` should no longer buffer the entire
1714 contents of each file in memory.
1715 [#7946](https://github.com/rust-lang/cargo/pull/7946)
1716- Ignore more invalid `Cargo.toml` files in a git dependency. Cargo currently
1717 walks the entire repo to find the requested package. Certain invalid
1718 manifests were already skipped, and now it should skip all of them.
1719 [#7947](https://github.com/rust-lang/cargo/pull/7947)
6efd25ca
EH
1720
1721### Nightly only
1722- Added `build.out-dir` config variable to set the output directory.
1723 [#7810](https://github.com/rust-lang/cargo/pull/7810)
1724- Added `-Zjobserver-per-rustc` feature to support improved performance for
1725 parallel rustc.
1726 [#7731](https://github.com/rust-lang/cargo/pull/7731)
05fe44b2
EH
1727- Fixed filename collision with `build-std` and crates like `cc`.
1728 [#7860](https://github.com/rust-lang/cargo/pull/7860)
1729- `-Ztimings` will now save its report even if there is an error.
1730 [#7872](https://github.com/rust-lang/cargo/pull/7872)
1731- Updated `--config` command-line flag to support taking a path to a config
1732 file to load.
1733 [#7901](https://github.com/rust-lang/cargo/pull/7901)
1734- Added new feature resolver.
1735 [#7820](https://github.com/rust-lang/cargo/pull/7820)
1736- Rustdoc docs now automatically include the version of the package in the
b3a1aa9c 1737 side bar (requires `-Z crate-versions` flag).
05fe44b2 1738 [#7903](https://github.com/rust-lang/cargo/pull/7903)
6efd25ca 1739
57020a5d 1740## Cargo 1.42 (2020-03-12)
6efd25ca 1741[0bf7aafe...rust-1.42.0](https://github.com/rust-lang/cargo/compare/0bf7aafe...rust-1.42.0)
1df81ee0
EH
1742
1743### Added
57020a5d
EH
1744- Added documentation on git authentication.
1745 [#7658](https://github.com/rust-lang/cargo/pull/7658)
1746- Bitbucket Pipeline badges are now supported on crates.io.
1747 [#7663](https://github.com/rust-lang/cargo/pull/7663)
6efd25ca
EH
1748- `cargo vendor` now accepts the `--versioned-dirs` option to force it to
1749 always include the version number in each package's directory name.
1750 [#7631](https://github.com/rust-lang/cargo/pull/7631)
1751- The `proc_macro` crate is now automatically added to the extern prelude for
1752 proc-macro packages. This means that `extern crate proc_macro;` is no longer
1753 necessary for proc-macros.
1754 [#7700](https://github.com/rust-lang/cargo/pull/7700)
57020a5d 1755
1df81ee0 1756### Changed
57020a5d
EH
1757- Emit a warning if `debug_assertions`, `test`, `proc_macro`, or `feature=` is
1758 used in a `cfg()` expression.
1759 [#7660](https://github.com/rust-lang/cargo/pull/7660)
6efd25ca
EH
1760- Large update to the Cargo documentation, adding new chapters on Cargo
1761 targets, workspaces, and features.
1762 [#7733](https://github.com/rust-lang/cargo/pull/7733)
1763- Windows: `.lib` DLL import libraries are now copied next to the dll for all
1764 Windows MSVC targets. Previously it was only supported for
1765 `pc-windows-msvc`. This adds DLL support for `uwp-windows-msvc` targets.
1766 [#7758](https://github.com/rust-lang/cargo/pull/7758)
1767- The `ar` field in the `[target]` configuration is no longer read. It has
1768 been ignored for over 4 years.
1769 [#7763](https://github.com/rust-lang/cargo/pull/7763)
1770- Bash completion file simplified and updated for latest changes.
1771 [#7789](https://github.com/rust-lang/cargo/pull/7789)
1772- Credentials are only loaded when needed, instead of every Cargo command.
1773 [#7774](https://github.com/rust-lang/cargo/pull/7774)
57020a5d 1774
1df81ee0 1775### Fixed
6efd25ca
EH
1776- Removed `--offline` empty index check, which was a false positive in some
1777 cases.
57020a5d 1778 [#7655](https://github.com/rust-lang/cargo/pull/7655)
6efd25ca
EH
1779- Files and directories starting with a `.` can now be included in a package
1780 by adding it to the `include` list.
1781 [#7680](https://github.com/rust-lang/cargo/pull/7680)
1782- Fixed `cargo login` removing alternative registry tokens when previous
1783 entries existed in the credentials file.
1784 [#7708](https://github.com/rust-lang/cargo/pull/7708)
1785- Fixed `cargo vendor` from panicking when used with alternative registries.
1786 [#7718](https://github.com/rust-lang/cargo/pull/7718)
1787- Fixed incorrect explanation in the fingerprint debug log message.
1788 [#7749](https://github.com/rust-lang/cargo/pull/7749)
1789- A `[source]` that is defined multiple times will now result in an error.
1790 Previously it was randomly picking a source, which could cause
1791 non-deterministic behavior.
1792 [#7751](https://github.com/rust-lang/cargo/pull/7751)
1793- `dep_kinds` in `cargo metadata` are now de-duplicated.
1794 [#7756](https://github.com/rust-lang/cargo/pull/7756)
1795- Fixed packaging where `Cargo.lock` was listed in `.gitignore` in a
1796 subdirectory inside a git repository. Previously it was assuming
1797 `Cargo.lock` was at the root of the repo.
1798 [#7779](https://github.com/rust-lang/cargo/pull/7779)
1799- Partial file transfer errors will now cause an automatic retry.
1800 [#7788](https://github.com/rust-lang/cargo/pull/7788)
1801- Linux: Fixed panic if CPU iowait stat decreases.
1802 [#7803](https://github.com/rust-lang/cargo/pull/7803)
1803- Fixed using the wrong sysroot for detecting host compiler settings when
1804 `--sysroot` is passed in via `RUSTFLAGS`.
1805 [#7798](https://github.com/rust-lang/cargo/pull/7798)
57020a5d
EH
1806
1807### Nightly only
6efd25ca 1808- `build-std` now uses `--extern` instead of `--sysroot` to find sysroot
9c892e6c 1809 packages.
6efd25ca
EH
1810 [#7699](https://github.com/rust-lang/cargo/pull/7699)
1811- Added `--config` command-line option to set config settings.
1812 [#7649](https://github.com/rust-lang/cargo/pull/7649)
1813- Added `include` config setting which allows including another config file.
1814 [#7649](https://github.com/rust-lang/cargo/pull/7649)
1815- Profiles in config files now support any named profile. Previously it was
1816 limited to dev/release.
1817 [#7750](https://github.com/rust-lang/cargo/pull/7750)
57020a5d
EH
1818
1819## Cargo 1.41 (2020-01-30)
1820[5da4b4d4...rust-1.41.0](https://github.com/rust-lang/cargo/compare/5da4b4d4...rust-1.41.0)
1821
1822### Added
1823- 🔥 Cargo now uses a new `Cargo.lock` file format. This new format should
1824 support easier merges in source control systems. Projects using the old
1825 format will continue to use the old format, only new `Cargo.lock` files will
1826 use the new format.
1827 [#7579](https://github.com/rust-lang/cargo/pull/7579)
1828- 🔥 `cargo install` will now upgrade already installed packages instead of
1829 failing.
1830 [#7560](https://github.com/rust-lang/cargo/pull/7560)
1831- 🔥 Profile overrides have been added. This allows overriding profiles for
1832 individual dependencies or build scripts. See [the
1833 documentation](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#overrides)
1834 for more.
1835 [#7591](https://github.com/rust-lang/cargo/pull/7591)
1836- Added new documentation for build scripts.
1837 [#7565](https://github.com/rust-lang/cargo/pull/7565)
1838- Added documentation for Cargo's JSON output.
1839 [#7595](https://github.com/rust-lang/cargo/pull/7595)
1840- Significant expansion of config and environment variable documentation.
1841 [#7650](https://github.com/rust-lang/cargo/pull/7650)
1842- Add back support for `BROWSER` environment variable for `cargo doc --open`.
1843 [#7576](https://github.com/rust-lang/cargo/pull/7576)
1844- Added `kind` and `platform` for dependencies in `cargo metadata`.
1845 [#7132](https://github.com/rust-lang/cargo/pull/7132)
1846- The `OUT_DIR` value is now included in the `build-script-executed` JSON message.
1847 [#7622](https://github.com/rust-lang/cargo/pull/7622)
1848
1849### Changed
1850- `cargo doc` will now document private items in binaries by default.
1851 [#7593](https://github.com/rust-lang/cargo/pull/7593)
1852- Subcommand typo suggestions now include aliases.
1853 [#7486](https://github.com/rust-lang/cargo/pull/7486)
1854- Tweak how the "already existing..." comment is added to `.gitignore`.
1855 [#7570](https://github.com/rust-lang/cargo/pull/7570)
1856- Ignore `cargo login` text from copy/paste in token.
1857 [#7588](https://github.com/rust-lang/cargo/pull/7588)
1858- Windows: Ignore errors for locking files when not supported by the filesystem.
1859 [#7602](https://github.com/rust-lang/cargo/pull/7602)
1860- Remove `**/*.rs.bk` from `.gitignore`.
1861 [#7647](https://github.com/rust-lang/cargo/pull/7647)
1862
1863### Fixed
1864- Fix unused warnings for some keys in the `build` config section.
1865 [#7575](https://github.com/rust-lang/cargo/pull/7575)
1866- Linux: Don't panic when parsing `/proc/stat`.
1867 [#7580](https://github.com/rust-lang/cargo/pull/7580)
1868- Don't show canonical path in `cargo vendor`.
1869 [#7629](https://github.com/rust-lang/cargo/pull/7629)
1870
1871### Nightly only
1872
1df81ee0 1873
8ad031b5 1874## Cargo 1.40 (2019-12-19)
57020a5d 1875[1c6ec66d...5da4b4d4](https://github.com/rust-lang/cargo/compare/1c6ec66d...5da4b4d4)
8ad031b5
EH
1876
1877### Added
1df81ee0
EH
1878- Added `http.ssl-version` config option to control the version of TLS,
1879 along with min/max versions.
1880 [#7308](https://github.com/rust-lang/cargo/pull/7308)
1df81ee0
EH
1881- 🔥 Compiler warnings are now cached on disk. If a build generates warnings,
1882 re-running the build will now re-display the warnings.
1883 [#7450](https://github.com/rust-lang/cargo/pull/7450)
1df81ee0
EH
1884- Added `--filter-platform` option to `cargo metadata` to narrow the nodes
1885 shown in the resolver graph to only packages included for the given target
1886 triple.
1887 [#7376](https://github.com/rust-lang/cargo/pull/7376)
8ad031b5
EH
1888
1889### Changed
1890- Cargo's "platform" `cfg` parsing has been extracted into a separate crate
1891 named `cargo-platform`.
1892 [#7375](https://github.com/rust-lang/cargo/pull/7375)
1df81ee0
EH
1893- Dependencies extracted into Cargo's cache no longer preserve mtimes to
1894 reduce syscall overhead.
1895 [#7465](https://github.com/rust-lang/cargo/pull/7465)
1896- Windows: EXE files no longer include a metadata hash in the filename.
1897 This helps with debuggers correlating the filename with the PDB file.
1898 [#7400](https://github.com/rust-lang/cargo/pull/7400)
1899- Wasm32: `.wasm` files are no longer treated as an "executable", allowing
1900 `cargo test` and `cargo run` to work properly with the generated `.js` file.
1901 [#7476](https://github.com/rust-lang/cargo/pull/7476)
1902- crates.io now supports SPDX 3.6 licenses.
1903 [#7481](https://github.com/rust-lang/cargo/pull/7481)
1904- Improved cyclic dependency error message.
1905 [#7470](https://github.com/rust-lang/cargo/pull/7470)
1906- Bare `cargo clean` no longer locks the package cache.
1907 [#7502](https://github.com/rust-lang/cargo/pull/7502)
1908- `cargo publish` now allows dev-dependencies without a version key to be
1909 published. A git or path-only dev-dependency will be removed from the
1910 package manifest before uploading.
1911 [#7333](https://github.com/rust-lang/cargo/pull/7333)
1df81ee0
EH
1912- `--features` and `--no-default-features` in the root of a virtual workspace
1913 will now generate an error instead of being ignored.
1914 [#7507](https://github.com/rust-lang/cargo/pull/7507)
1915- Generated files (like `Cargo.toml` and `Cargo.lock`) in a package archive
1916 now have their timestamp set to the current time instead of the epoch.
1917 [#7523](https://github.com/rust-lang/cargo/pull/7523)
1918- The `-Z` flag parser is now more strict, rejecting more invalid syntax.
1919 [#7531](https://github.com/rust-lang/cargo/pull/7531)
8ad031b5
EH
1920
1921### Fixed
1922- Fixed an issue where if a package had an `include` field, and `Cargo.lock`
1923 in `.gitignore`, and a binary or example target, and the `Cargo.lock` exists
1924 in the current project, it would fail to publish complaining the
1925 `Cargo.lock` was dirty.
1926 [#7448](https://github.com/rust-lang/cargo/pull/7448)
1927- Fixed a panic in a particular combination of `[patch]` entries.
1928 [#7452](https://github.com/rust-lang/cargo/pull/7452)
1df81ee0
EH
1929- Windows: Better error message when `cargo test` or `rustc` crashes in an
1930 abnormal way, such as a signal or seg fault.
1931 [#7535](https://github.com/rust-lang/cargo/pull/7535)
e77351a5
EH
1932
1933### Nightly only
1934- The `mtime-on-use` feature may now be enabled via the
1935 `unstable.mtime_on_use` config option.
1936 [#7411](https://github.com/rust-lang/cargo/pull/7411)
1937- Added support for named profiles.
1938 [#6989](https://github.com/rust-lang/cargo/pull/6989)
1939- Added `-Zpanic-abort-tests` to allow building and running tests with the
1940 "abort" panic strategy.
1941 [#7460](https://github.com/rust-lang/cargo/pull/7460)
1942- Changed `build-std` to use `--sysroot`.
1943 [#7421](https://github.com/rust-lang/cargo/pull/7421)
1944- Various fixes and enhancements to `-Ztimings`.
1945 [#7395](https://github.com/rust-lang/cargo/pull/7395)
1946 [#7398](https://github.com/rust-lang/cargo/pull/7398)
1947 [#7397](https://github.com/rust-lang/cargo/pull/7397)
1948 [#7403](https://github.com/rust-lang/cargo/pull/7403)
1949 [#7428](https://github.com/rust-lang/cargo/pull/7428)
1950 [#7429](https://github.com/rust-lang/cargo/pull/7429)
1951- Profile overrides have renamed the syntax to be
1952 `[profile.dev.package.NAME]`.
1953 [#7504](https://github.com/rust-lang/cargo/pull/7504)
1954- Fixed warnings for unused profile overrides in a workspace.
1df81ee0 1955 [#7536](https://github.com/rust-lang/cargo/pull/7536)
8ad031b5 1956
5c7875d2 1957## Cargo 1.39 (2019-11-07)
1df81ee0 1958[e853aa97...1c6ec66d](https://github.com/rust-lang/cargo/compare/e853aa97...1c6ec66d)
5c7875d2
EH
1959
1960### Added
8ad031b5
EH
1961- Config files may now use the `.toml` filename extension.
1962 [#7295](https://github.com/rust-lang/cargo/pull/7295)
8ad031b5
EH
1963- The `--workspace` flag has been added as an alias for `--all` to help avoid
1964 confusion about the meaning of "all".
1965 [#7241](https://github.com/rust-lang/cargo/pull/7241)
1966- The `publish` field has been added to `cargo metadata`.
1967 [#7354](https://github.com/rust-lang/cargo/pull/7354)
5c7875d2
EH
1968
1969### Changed
1970- Display more information if parsing the output from `rustc` fails.
1971 [#7236](https://github.com/rust-lang/cargo/pull/7236)
1972- TOML errors now show the column number.
1973 [#7248](https://github.com/rust-lang/cargo/pull/7248)
1974- `cargo vendor` no longer deletes files in the `vendor` directory that starts
1975 with a `.`.
1976 [#7242](https://github.com/rust-lang/cargo/pull/7242)
1977- `cargo fetch` will now show manifest warnings.
1978 [#7243](https://github.com/rust-lang/cargo/pull/7243)
1979- `cargo publish` will now check git submodules if they contain any
1980 uncommitted changes.
1981 [#7245](https://github.com/rust-lang/cargo/pull/7245)
1982- In a build script, `cargo:rustc-flags` now allows `-l` and `-L` flags
1983 without spaces.
1984 [#7257](https://github.com/rust-lang/cargo/pull/7257)
1985- When `cargo install` replaces an older version of a package it will now
1986 delete any installed binaries that are no longer present in the newly
1987 installed version.
1988 [#7246](https://github.com/rust-lang/cargo/pull/7246)
1989- A git dependency may now also specify a `version` key when published. The
1990 `git` value will be stripped from the uploaded crate, matching the behavior
1991 of `path` dependencies.
1992 [#7237](https://github.com/rust-lang/cargo/pull/7237)
8ad031b5
EH
1993- The behavior of workspace default-members has changed. The default-members
1994 now only applies when running Cargo in the root of the workspace. Previously
1995 it would always apply regardless of which directory Cargo is running in.
1996 [#7270](https://github.com/rust-lang/cargo/pull/7270)
1997- libgit2 updated pulling in all upstream changes.
1998 [#7275](https://github.com/rust-lang/cargo/pull/7275)
1999- Bump `home` dependency for locating home directories.
2000 [#7277](https://github.com/rust-lang/cargo/pull/7277)
2001- zsh completions have been updated.
2002 [#7296](https://github.com/rust-lang/cargo/pull/7296)
2003- SSL connect errors are now retried.
2004 [#7318](https://github.com/rust-lang/cargo/pull/7318)
2005- The jobserver has been changed to acquire N tokens (instead of N-1), and
2006 then immediately acquires the extra token. This was changed to accommodate
2007 the `cc` crate on Windows to allow it to release its implicit token.
2008 [#7344](https://github.com/rust-lang/cargo/pull/7344)
2009- The scheduling algorithm for choosing which crate to build next has been
2010 changed. It now chooses the crate with the greatest number of transitive
2011 crates waiting on it. Previously it used a maximum topological depth.
2012 [#7390](https://github.com/rust-lang/cargo/pull/7390)
1df81ee0
EH
2013- RUSTFLAGS are no longer incorporated in the metadata and filename hash,
2014 reversing the change from 1.33 that added it. This means that any change to
2015 RUSTFLAGS will cause a recompile, and will not affect symbol munging.
2016 [#7459](https://github.com/rust-lang/cargo/pull/7459)
5c7875d2
EH
2017
2018### Fixed
2019- Git dependencies with submodules with shorthand SSH URLs (like
2020 `git@github.com/user/repo.git`) should now work.
2021 [#7238](https://github.com/rust-lang/cargo/pull/7238)
8ad031b5
EH
2022- Handle broken symlinks when creating `.dSYM` symlinks on macOS.
2023 [#7268](https://github.com/rust-lang/cargo/pull/7268)
2024- Fixed issues with multiple versions of the same crate in a `[patch]` table.
2025 [#7303](https://github.com/rust-lang/cargo/pull/7303)
2026- Fixed issue with custom target `.json` files where a substring of the name
2027 matches an unsupported crate type (like "bin").
2028 [#7363](https://github.com/rust-lang/cargo/issues/7363)
2029- Fixed issues with generating documentation for proc-macro crate types.
2030 [#7159](https://github.com/rust-lang/cargo/pull/7159)
2031- Fixed hang if Cargo panics within a build thread.
2032 [#7366](https://github.com/rust-lang/cargo/pull/7366)
2033- Fixed rebuild detection if a `build.rs` script issues different `rerun-if`
2034 directives between builds. Cargo was erroneously causing a rebuild after the
2035 change.
2036 [#7373](https://github.com/rust-lang/cargo/pull/7373)
2037- Properly handle canonical URLs for `[patch]` table entries, preventing
2038 the patch from working after the first time it is used.
2039 [#7368](https://github.com/rust-lang/cargo/pull/7368)
2040- Fixed an issue where integration tests were waiting for the package binary
2041 to finish building before starting their own build. They now may build
2042 concurrently.
2043 [#7394](https://github.com/rust-lang/cargo/pull/7394)
2044- Fixed accidental change in the previous release on how `--features a b` flag
2045 is interpreted, restoring the original behavior where this is interpreted as
2046 `--features a` along with the argument `b` passed to the command. To pass
2047 multiple features, use quotes around the features to pass multiple features
2048 like `--features "a b"`, or use commas, or use multiple `--features` flags.
2049 [#7419](https://github.com/rust-lang/cargo/pull/7419)
5c7875d2 2050
e77351a5
EH
2051### Nightly only
2052- Basic support for building the standard library directly from Cargo has been
2053 added.
2054 ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std))
2055 [#7216](https://github.com/rust-lang/cargo/pull/7216)
2056- Added `-Ztimings` feature to generate an HTML report on the time spent on
2057 individual compilation steps. This also may output completion steps on the
2058 console and JSON data.
2059 ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#timings))
2060 [#7311](https://github.com/rust-lang/cargo/pull/7311)
2061- Added ability to cross-compile doctests.
2062 ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile))
2063 [#6892](https://github.com/rust-lang/cargo/pull/6892)
2064
1707d37f 2065## Cargo 1.38 (2019-09-26)
8ad031b5 2066[4c1fa54d...23ef9a4e](https://github.com/rust-lang/cargo/compare/4c1fa54d...23ef9a4e)
9e9c5868
EH
2067
2068### Added
5c7875d2 2069- 🔥 Cargo build pipelining has been enabled by default to leverage more idle CPU
45699e9f
AC
2070 parallelism during builds.
2071 [#7143](https://github.com/rust-lang/cargo/pull/7143)
2072- The `--message-format` option to Cargo can now be specified multiple times and
2073 accepts a comma-separated list of values. In addition to the previous values
2074 it also now accepts `json-diagnostic-short` and
2075 `json-diagnostic-rendered-ansi` which configures the output coming from rustc
2076 in `json` message mode.
2077 [#7214](https://github.com/rust-lang/cargo/pull/7214)
5c7875d2
EH
2078- Cirrus CI badges are now supported on crates.io.
2079 [#7119](https://github.com/rust-lang/cargo/pull/7119)
5c7875d2
EH
2080- A new format for `Cargo.lock` has been introduced. This new format is
2081 intended to avoid source-control merge conflicts more often, and to
2082 generally make it safer to merge changes. This new format is *not* enabled
2083 at this time, though Cargo will use it if it sees it. At some point in the
2084 future, it is intended that this will become the default.
2085 [#7070](https://github.com/rust-lang/cargo/pull/7070)
2086- Progress bar support added for FreeBSD.
2087 [#7222](https://github.com/rust-lang/cargo/pull/7222)
45699e9f 2088
9e9c5868 2089### Changed
5c7875d2
EH
2090- The `-q` flag will no longer suppress the root error message for an error
2091 from Cargo itself.
2092 [#7116](https://github.com/rust-lang/cargo/pull/7116)
2093- The Cargo Book is now published with mdbook 0.3 providing a number of
2094 formatting fixes and improvements.
2095 [#7140](https://github.com/rust-lang/cargo/pull/7140)
2096- The `--features` command-line flag can now be specified multiple times.
2097 The list of features from all the flags are joined together.
2098 [#7084](https://github.com/rust-lang/cargo/pull/7084)
5c7875d2
EH
2099- Package include/exclude glob-vs-gitignore warnings have been removed.
2100 Packages may now use gitignore-style matching without producing any
2101 warnings.
2102 [#7170](https://github.com/rust-lang/cargo/pull/7170)
2103- Cargo now shows the command and output when parsing `rustc` output fails
2104 when querying `rustc` for information like `cfg` values.
2105 [#7185](https://github.com/rust-lang/cargo/pull/7185)
2106- `cargo package`/`cargo publish` now allows a symbolic link to a git
2107 submodule to include that submodule.
2108 [#6817](https://github.com/rust-lang/cargo/pull/6817)
2109- Improved the error message when a version requirement does not
2110 match any versions, but there are pre-release versions available.
2111 [#7191](https://github.com/rust-lang/cargo/pull/7191)
9e9c5868
EH
2112
2113### Fixed
9e9c5868
EH
2114- Fixed using the wrong directory when updating git repositories when using
2115 the `git-fetch-with-cli` config option, and the `GIT_DIR` environment
2116 variable is set. This may happen when running cargo from git callbacks.
2117 [#7082](https://github.com/rust-lang/cargo/pull/7082)
5c7875d2
EH
2118- Fixed dep-info files being overwritten for targets that have separate debug
2119 outputs. For example, binaries on `-apple-` targets with `.dSYM` directories
2120 would overwrite the `.d` file.
2121 [#7057](https://github.com/rust-lang/cargo/pull/7057)
2122- Fix `[patch]` table not preserving "one major version per source" rule.
2123 [#7118](https://github.com/rust-lang/cargo/pull/7118)
2124- Ignore `--remap-path-prefix` flags for the metadata hash in the `cargo
2125 rustc` command. This was causing the remap settings to inadvertently affect
2126 symbol names.
2127 [#7134](https://github.com/rust-lang/cargo/pull/7134)
2128- Fixed cycle detection in `[patch]` dependencies.
2129 [#7174](https://github.com/rust-lang/cargo/pull/7174)
2130- Fixed `cargo new` leaving behind a symlink on Windows when `core.symlinks`
2131 git config is true. Also adds a number of fixes and updates from upstream
2132 libgit2.
2133 [#7176](https://github.com/rust-lang/cargo/pull/7176)
2134- macOS: Fixed setting the flag to mark the `target` directory to be excluded
2135 from backups.
2136 [#7192](https://github.com/rust-lang/cargo/pull/7192)
2137- Fixed `cargo fix` panicking under some situations involving multi-byte
2138 characters.
2139 [#7221](https://github.com/rust-lang/cargo/pull/7221)
e77351a5
EH
2140
2141### Nightly only
2142- Added `cargo fix --clippy` which will apply machine-applicable fixes from
2143 Clippy.
2144 [#7069](https://github.com/rust-lang/cargo/pull/7069)
2145- Added `-Z binary-dep-depinfo` flag to add change tracking for binary
2146 dependencies like the standard library.
2147 [#7137](https://github.com/rust-lang/cargo/pull/7137)
2148 [#7219](https://github.com/rust-lang/cargo/pull/7219)
2149- `cargo clippy-preview` will always run, even if no changes have been made.
2150 [#7157](https://github.com/rust-lang/cargo/pull/7157)
2151- Fixed exponential blowup when using `CARGO_BUILD_PIPELINING`.
2152 [#7062](https://github.com/rust-lang/cargo/pull/7062)
2153- Fixed passing args to clippy in `cargo clippy-preview`.
5c7875d2 2154 [#7162](https://github.com/rust-lang/cargo/pull/7162)
9e9c5868 2155
114e20b3 2156## Cargo 1.37 (2019-08-15)
8ad031b5 2157[c4fcfb72...9edd0891](https://github.com/rust-lang/cargo/compare/c4fcfb72...9edd0891)
114e20b3
EH
2158
2159### Added
9e9c5868
EH
2160- Added `doctest` field to `cargo metadata` to determine if a target's
2161 documentation is tested.
114e20b3
EH
2162 [#6953](https://github.com/rust-lang/cargo/pull/6953)
2163 [#6965](https://github.com/rust-lang/cargo/pull/6965)
9e9c5868
EH
2164- 🔥 The [`cargo
2165 vendor`](https://doc.rust-lang.org/nightly/cargo/commands/cargo-vendor.html)
2166 command is now built-in to Cargo. This command may be used to create a local
2167 copy of the sources of all dependencies.
2168 [#6869](https://github.com/rust-lang/cargo/pull/6869)
2169- 🔥 The "publish lockfile" feature is now stable. This feature will
2170 automatically include the `Cargo.lock` file when a package is published if
2171 it contains a binary executable target. By default, Cargo will ignore
2172 `Cargo.lock` when installing a package. To force Cargo to use the
2173 `Cargo.lock` file included in the published package, use `cargo install
2174 --locked`. This may be useful to ensure that `cargo install` consistently
2175 reproduces the same result. It may also be useful when a semver-incompatible
2176 change is accidentally published to a dependency, providing a way to fall
2177 back to a version that is known to work.
2178 [#7026](https://github.com/rust-lang/cargo/pull/7026)
2179- 🔥 The `default-run` feature has been stabilized. This feature allows you to
2180 specify which binary executable to run by default with `cargo run` when a
2181 package includes multiple binaries. Set the `default-run` key in the
2182 `[package]` table in `Cargo.toml` to the name of the binary to use by
2183 default.
2184 [#7056](https://github.com/rust-lang/cargo/pull/7056)
114e20b3
EH
2185
2186### Changed
2187- `cargo package` now verifies that build scripts do not create empty
2188 directories.
2189 [#6973](https://github.com/rust-lang/cargo/pull/6973)
9e9c5868
EH
2190- A warning is now issued if `cargo doc` generates duplicate outputs, which
2191 causes files to be randomly stomped on. This may happen for a variety of
2192 reasons (renamed dependencies, multiple versions of the same package,
2193 packages with renamed libraries, etc.). This is a known bug, which needs
2194 more work to handle correctly.
2195 [#6998](https://github.com/rust-lang/cargo/pull/6998)
2196- Enabling a dependency's feature with `--features foo/bar` will no longer
2197 compile the current crate with the `foo` feature if `foo` is not an optional
2198 dependency.
2199 [#7010](https://github.com/rust-lang/cargo/pull/7010)
2200- If `--remap-path-prefix` is passed via RUSTFLAGS, it will no longer affect
2201 the filename metadata hash.
2202 [#6966](https://github.com/rust-lang/cargo/pull/6966)
2203- libgit2 has been updated to 0.28.2, which Cargo uses to access git
2204 repositories. This brings in hundreds of changes and fixes since it was last
2205 updated in November.
2206 [#7018](https://github.com/rust-lang/cargo/pull/7018)
2207- Cargo now supports absolute paths in the dep-info files generated by rustc.
2208 This is laying the groundwork for [tracking
2209 binaries](https://github.com/rust-lang/rust/pull/61727), such as libstd, for
2210 rebuild detection. (Note: this contains a known bug.)
2211 [#7030](https://github.com/rust-lang/cargo/pull/7030)
114e20b3
EH
2212
2213### Fixed
2214- Fixed how zsh completions fetch the list of commands.
2215 [#6956](https://github.com/rust-lang/cargo/pull/6956)
2216- "+ debuginfo" is no longer printed in the build summary when `debug` is set
2217 to 0.
2218 [#6971](https://github.com/rust-lang/cargo/pull/6971)
9e9c5868
EH
2219- Fixed `cargo doc` with an example configured with `doc = true` to document
2220 correctly.
2221 [#7023](https://github.com/rust-lang/cargo/pull/7023)
5c7875d2
EH
2222- Don't fail if a read-only lock cannot be acquired in CARGO_HOME. This helps
2223 when CARGO_HOME doesn't exist, but `--locked` is used which means CARGO_HOME
2224 is not needed.
2225 [#7149](https://github.com/rust-lang/cargo/pull/7149)
2226- Reverted a change in 1.35 which released jobserver tokens when Cargo blocked
2227 on a lock file. It caused a deadlock in some situations.
2228 [#7204](https://github.com/rust-lang/cargo/pull/7204)
114e20b3 2229
e77351a5
EH
2230### Nightly only
2231- Added [compiler message
2232 caching](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#cache-messages).
2233 The `-Z cache-messages` flag makes cargo cache the compiler output so that
2234 future runs can redisplay previous warnings.
2235 [#6933](https://github.com/rust-lang/cargo/pull/6933)
2236- `-Z mtime-on-use` no longer touches intermediate artifacts.
2237 [#7050](https://github.com/rust-lang/cargo/pull/7050)
2238
2cbb701b 2239## Cargo 1.36 (2019-07-04)
114e20b3 2240[6f3e9c36...c4fcfb72](https://github.com/rust-lang/cargo/compare/6f3e9c36...c4fcfb72)
2cbb701b
EH
2241
2242### Added
114e20b3
EH
2243- Added more detailed documentation on target auto-discovery.
2244 [#6898](https://github.com/rust-lang/cargo/pull/6898)
114e20b3
EH
2245- 🔥 Stabilize the `--offline` flag which allows using cargo without a network
2246 connection.
2247 [#6934](https://github.com/rust-lang/cargo/pull/6934)
2248 [#6871](https://github.com/rust-lang/cargo/pull/6871)
2cbb701b
EH
2249
2250### Changed
2251- `publish = ["crates-io"]` may be added to the manifest to restrict
2252 publishing to crates.io only.
2253 [#6838](https://github.com/rust-lang/cargo/pull/6838)
2254- macOS: Only include the default paths if `DYLD_FALLBACK_LIBRARY_PATH` is not
2255 set. Also, remove `/lib` from the default set.
2256 [#6856](https://github.com/rust-lang/cargo/pull/6856)
2257- `cargo publish` will now exit early if the login token is not available.
2258 [#6854](https://github.com/rust-lang/cargo/pull/6854)
2259- HTTP/2 stream errors are now considered "spurious" and will cause a retry.
2260 [#6861](https://github.com/rust-lang/cargo/pull/6861)
2cbb701b
EH
2261- Setting a feature on a dependency where that feature points to a *required*
2262 dependency is now an error. Previously it was a warning.
2263 [#6860](https://github.com/rust-lang/cargo/pull/6860)
114e20b3
EH
2264- The `registry.index` config value now supports relative `file:` URLs.
2265 [#6873](https://github.com/rust-lang/cargo/pull/6873)
2266- macOS: The `.dSYM` directory is now symbolically linked next to example
2267 binaries without the metadata hash so that debuggers can find it.
2268 [#6891](https://github.com/rust-lang/cargo/pull/6891)
2269- The default `Cargo.toml` template for now projects now includes a comment
2270 providing a link to the documentation.
2271 [#6881](https://github.com/rust-lang/cargo/pull/6881)
2272- Some improvements to the wording of the crate download summary.
2273 [#6916](https://github.com/rust-lang/cargo/pull/6916)
2274 [#6920](https://github.com/rust-lang/cargo/pull/6920)
2275- ✨ Changed `RUST_LOG` environment variable to `CARGO_LOG` so that user code
2276 that uses the `log` crate will not display cargo's debug output.
2277 [#6918](https://github.com/rust-lang/cargo/pull/6918)
2278- `Cargo.toml` is now always included when packaging, even if it is not listed
2279 in `package.include`.
2280 [#6925](https://github.com/rust-lang/cargo/pull/6925)
2281- Package include/exclude values now use gitignore patterns instead of glob
2282 patterns. [#6924](https://github.com/rust-lang/cargo/pull/6924)
2283- Provide a better error message when crates.io times out. Also improve error
2284 messages with other HTTP response codes.
2285 [#6936](https://github.com/rust-lang/cargo/pull/6936)
2286
2287### Performance
2cbb701b
EH
2288- Resolver performance improvements for some cases.
2289 [#6853](https://github.com/rust-lang/cargo/pull/6853)
114e20b3
EH
2290- Optimized how cargo reads the index JSON files by caching the results.
2291 [#6880](https://github.com/rust-lang/cargo/pull/6880)
2292 [#6912](https://github.com/rust-lang/cargo/pull/6912)
2293 [#6940](https://github.com/rust-lang/cargo/pull/6940)
2294- Various performance improvements.
2295 [#6867](https://github.com/rust-lang/cargo/pull/6867)
2cbb701b
EH
2296
2297### Fixed
2298- More carefully track the on-disk fingerprint information for dependencies.
2299 This can help in some rare cases where the build is interrupted and
2300 restarted. [#6832](https://github.com/rust-lang/cargo/pull/6832)
2301- `cargo run` now correctly passes non-UTF8 arguments to the child process.
2302 [#6849](https://github.com/rust-lang/cargo/pull/6849)
114e20b3
EH
2303- Fixed bash completion to run on bash 3.2, the stock version in macOS.
2304 [#6905](https://github.com/rust-lang/cargo/pull/6905)
2305- Various fixes and improvements to zsh completion.
2306 [#6926](https://github.com/rust-lang/cargo/pull/6926)
2307 [#6929](https://github.com/rust-lang/cargo/pull/6929)
2308- Fix `cargo update` ignoring `-p` arguments if the `Cargo.lock` file was
2309 missing.
2310 [#6904](https://github.com/rust-lang/cargo/pull/6904)
2cbb701b 2311
e77351a5
EH
2312### Nightly only
2313- Added [`-Z install-upgrade`
2314 feature](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#install-upgrade)
2315 to track details about installed crates and to update them if they are
2316 out-of-date. [#6798](https://github.com/rust-lang/cargo/pull/6798)
2317- Added the [`public-dependency`
2318 feature](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#public-dependency)
2319 which allows tracking public versus private dependencies.
2320 [#6772](https://github.com/rust-lang/cargo/pull/6772)
2321- Added build pipelining via the `build.pipelining` config
2322 option (`CARGO_BUILD_PIPELINING` env var).
2323 [#6883](https://github.com/rust-lang/cargo/pull/6883)
2324- The `publish-lockfile` feature has had some significant changes. The default
2325 is now `true`, the `Cargo.lock` will always be published for binary crates.
2326 The `Cargo.lock` is now regenerated during publishing. `cargo install` now
2327 ignores the `Cargo.lock` file by default, and requires `--locked` to use the
2328 lock file. Warnings have been added if yanked dependencies are detected.
2329 [#6840](https://github.com/rust-lang/cargo/pull/6840)
2330
2cbb701b
EH
2331## Cargo 1.35 (2019-05-23)
2332[6789d8a0...6f3e9c36](https://github.com/rust-lang/cargo/compare/6789d8a0...6f3e9c36)
2333
2334### Added
2335- Added the `rustc-cdylib-link-arg` key for build scripts to specify linker
2336 arguments for cdylib crates.
2337 [#6298](https://github.com/rust-lang/cargo/pull/6298)
2cbb701b
EH
2338
2339### Changed
2340- When passing a test filter, such as `cargo test foo`, don't build examples
2341 (unless they set `test = true`).
2342 [#6683](https://github.com/rust-lang/cargo/pull/6683)
2343- Forward the `--quiet` flag from `cargo test` to the libtest harness so that
2344 tests are actually quiet.
2345 [#6358](https://github.com/rust-lang/cargo/pull/6358)
2346- The verification step in `cargo package` that checks if any files are
2347 modified is now stricter. It uses a hash of the contents instead of checking
2348 filesystem mtimes. It also checks *all* files in the package.
2349 [#6740](https://github.com/rust-lang/cargo/pull/6740)
2350- Jobserver tokens are now released whenever Cargo blocks on a file lock.
2351 [#6748](https://github.com/rust-lang/cargo/pull/6748)
2352- Issue a warning for a previous bug in the TOML parser that allowed multiple
2353 table headers with the same name.
2354 [#6761](https://github.com/rust-lang/cargo/pull/6761)
2355- Removed the `CARGO_PKG_*` environment variables from the metadata hash and
2356 added them to the fingerprint instead. This means that when these values
2357 change, stale artifacts are not left behind. Also added the "repository"
2358 value to the fingerprint.
2359 [#6785](https://github.com/rust-lang/cargo/pull/6785)
2360- `cargo metadata` no longer shows a `null` field for a dependency without a
2361 library in `resolve.nodes.deps`. The dependency is no longer shown.
2362 [#6534](https://github.com/rust-lang/cargo/pull/6534)
2363- `cargo new` will no longer include an email address in the `authors` field
2364 if it is set to the empty string.
2365 [#6802](https://github.com/rust-lang/cargo/pull/6802)
2366- `cargo doc --open` now works when documenting multiple packages.
2367 [#6803](https://github.com/rust-lang/cargo/pull/6803)
2368- `cargo install --path P` now loads the `.cargo/config` file from the
2369 directory P. [#6805](https://github.com/rust-lang/cargo/pull/6805)
2370- Using semver metadata in a version requirement (such as `1.0.0+1234`) now
2371 issues a warning that it is ignored.
2372 [#6806](https://github.com/rust-lang/cargo/pull/6806)
2373- `cargo install` now rejects certain combinations of flags where some flags
2374 would have been ignored.
2375 [#6801](https://github.com/rust-lang/cargo/pull/6801)
2cbb701b
EH
2376- Resolver performance improvements for some cases.
2377 [#6776](https://github.com/rust-lang/cargo/pull/6776)
2cbb701b
EH
2378
2379### Fixed
2380- Fixed running separate commands (such as `cargo build` then `cargo test`)
2381 where the second command could use stale results from a build script.
2382 [#6720](https://github.com/rust-lang/cargo/pull/6720)
2383- Fixed `cargo fix` not working properly if a `.gitignore` file that matched
2384 the root package directory.
2385 [#6767](https://github.com/rust-lang/cargo/pull/6767)
2386- Fixed accidentally compiling a lib multiple times if `panic=unwind` was set
2387 in a profile. [#6781](https://github.com/rust-lang/cargo/pull/6781)
2388- Paths to JSON files in `build.target` config value are now canonicalized to
2389 fix building dependencies.
2390 [#6778](https://github.com/rust-lang/cargo/pull/6778)
2391- Fixed re-running a build script if its compilation was interrupted (such as
2392 if it is killed). [#6782](https://github.com/rust-lang/cargo/pull/6782)
2393- Fixed `cargo new` initializing a fossil repo.
2394 [#6792](https://github.com/rust-lang/cargo/pull/6792)
2395- Fixed supporting updating a git repo that has a force push when using the
2396 `git-fetch-with-cli` feature. `git-fetch-with-cli` also shows more error
2397 information now when it fails.
2398 [#6800](https://github.com/rust-lang/cargo/pull/6800)
2399- `--example` binaries built for the WASM target are fixed to no longer
2400 include a metadata hash in the filename, and are correctly emitted in the
2401 `compiler-artifact` JSON message.
2402 [#6812](https://github.com/rust-lang/cargo/pull/6812)
2403
e77351a5
EH
2404### Nightly only
2405- `cargo clippy-preview` is now a built-in cargo command.
2406 [#6759](https://github.com/rust-lang/cargo/pull/6759)
2407- The `build-override` profile setting now includes proc-macros and their
2408 dependencies.
2409 [#6811](https://github.com/rust-lang/cargo/pull/6811)
2410- Optional and target dependencies now work better with `-Z offline`.
2411 [#6814](https://github.com/rust-lang/cargo/pull/6814)
2412
2cbb701b
EH
2413## Cargo 1.34 (2019-04-11)
2414[f099fe94...6789d8a0](https://github.com/rust-lang/cargo/compare/f099fe94...6789d8a0)
2415
2416### Added
2417- 🔥 Stabilized support for [alternate
2418 registries](https://doc.rust-lang.org/1.34.0/cargo/reference/registries.html).
2419 [#6654](https://github.com/rust-lang/cargo/pull/6654)
2cbb701b
EH
2420- Added documentation on using builds.sr.ht Continuous Integration with Cargo.
2421 [#6565](https://github.com/rust-lang/cargo/pull/6565)
2422- `Cargo.lock` now includes a comment at the top that it is `@generated`.
2423 [#6548](https://github.com/rust-lang/cargo/pull/6548)
2424- Azure DevOps badges are now supported.
2425 [#6264](https://github.com/rust-lang/cargo/pull/6264)
2cbb701b
EH
2426- Added a warning if `--exclude` flag specifies an unknown package.
2427 [#6679](https://github.com/rust-lang/cargo/pull/6679)
2428
2429### Changed
2430- `cargo test --doc --no-run` doesn't do anything, so it now displays an error
2431 to that effect. [#6628](https://github.com/rust-lang/cargo/pull/6628)
2432- Various updates to bash completion: add missing options and commands,
2433 support libtest completions, use rustup for `--target` completion, fallback
2434 to filename completion, fix editing the command line.
2435 [#6644](https://github.com/rust-lang/cargo/pull/6644)
2436- Publishing a crate with a `[patch]` section no longer generates an error.
2437 The `[patch]` section is removed from the manifest before publishing.
2438 [#6535](https://github.com/rust-lang/cargo/pull/6535)
2439- `build.incremental = true` config value is now treated the same as
2440 `CARGO_INCREMENTAL=1`, previously it was ignored.
2441 [#6688](https://github.com/rust-lang/cargo/pull/6688)
2442- Errors from a registry are now always displayed regardless of the HTTP
2443 response code. [#6771](https://github.com/rust-lang/cargo/pull/6771)
2444
2445### Fixed
2446- Fixed bash completion for `cargo run --example`.
2447 [#6578](https://github.com/rust-lang/cargo/pull/6578)
2448- Fixed a race condition when using a *local* registry and running multiple
2449 cargo commands at the same time that build the same crate.
2450 [#6591](https://github.com/rust-lang/cargo/pull/6591)
2451- Fixed some flickering and excessive updates of the progress bar.
2452 [#6615](https://github.com/rust-lang/cargo/pull/6615)
2453- Fixed a hang when using a git credential helper that returns incorrect
2454 credentials. [#6681](https://github.com/rust-lang/cargo/pull/6681)
2455- Fixed resolving yanked crates with a local registry.
2456 [#6750](https://github.com/rust-lang/cargo/pull/6750)
2457
e77351a5
EH
2458### Nightly only
2459- Added `-Z mtime-on-use` flag to cause the mtime to be updated on the
2460 filesystem when a crate is used. This is intended to be able to track stale
2461 artifacts in the future for cleaning up unused files.
2462 [#6477](https://github.com/rust-lang/cargo/pull/6477)
2463 [#6573](https://github.com/rust-lang/cargo/pull/6573)
2464- Added experimental `-Z dual-proc-macros` to build proc macros for both the
2465 host and the target.
2466 [#6547](https://github.com/rust-lang/cargo/pull/6547)
2467
2cbb701b
EH
2468## Cargo 1.33 (2019-02-28)
2469[8610973a...f099fe94](https://github.com/rust-lang/cargo/compare/8610973a...f099fe94)
2470
2471### Added
2472- `compiler-artifact` JSON messages now include an `"executable"` key which
2473 includes the path to the executable that was built.
2474 [#6363](https://github.com/rust-lang/cargo/pull/6363)
2475- The man pages have been rewritten, and are now published with the web
2476 documentation. [#6405](https://github.com/rust-lang/cargo/pull/6405)
2cbb701b
EH
2477- `cargo login` now displays a confirmation after saving the token.
2478 [#6466](https://github.com/rust-lang/cargo/pull/6466)
2479- A warning is now emitted if a `[patch]` entry does not match any package.
2480 [#6470](https://github.com/rust-lang/cargo/pull/6470)
2481- `cargo metadata` now includes the `links` key for a package.
2482 [#6480](https://github.com/rust-lang/cargo/pull/6480)
2cbb701b
EH
2483- "Very verbose" output with `-vv` now displays the environment variables that
2484 cargo sets when it runs a process.
2485 [#6492](https://github.com/rust-lang/cargo/pull/6492)
2486- `--example`, `--bin`, `--bench`, or `--test` without an argument now lists
2487 the available targets for those options.
2488 [#6505](https://github.com/rust-lang/cargo/pull/6505)
2489- Windows: If a process fails with an extended status exit code, a
2490 human-readable name for the code is now displayed.
2491 [#6532](https://github.com/rust-lang/cargo/pull/6532)
2492- Added `--features`, `--no-default-features`, and `--all-features` flags to
2493 the `cargo package` and `cargo publish` commands to use the given features
2494 when verifying the package.
2495 [#6453](https://github.com/rust-lang/cargo/pull/6453)
2496
2497### Changed
2498- If `cargo fix` fails to compile the fixed code, the rustc errors are now
2499 displayed on the console.
2500 [#6419](https://github.com/rust-lang/cargo/pull/6419)
2cbb701b
EH
2501- Hide the `--host` flag from `cargo login`, it is unused.
2502 [#6466](https://github.com/rust-lang/cargo/pull/6466)
2cbb701b
EH
2503- Build script fingerprints now include the rustc version.
2504 [#6473](https://github.com/rust-lang/cargo/pull/6473)
2505- macOS: Switched to setting `DYLD_FALLBACK_LIBRARY_PATH` instead of
2506 `DYLD_LIBRARY_PATH`. [#6355](https://github.com/rust-lang/cargo/pull/6355)
2507- `RUSTFLAGS` is now included in the metadata hash, meaning that changing
2508 the flags will not overwrite previously built files.
2509 [#6503](https://github.com/rust-lang/cargo/pull/6503)
2510- When updating the crate graph, unrelated yanked crates were erroneously
2511 removed. They are now kept at their original version if possible. This was
2512 causing unrelated packages to be downgraded during `cargo update -p
2513 somecrate`. [#5702](https://github.com/rust-lang/cargo/issues/5702)
2514- TOML files now support the [0.5 TOML
2515 syntax](https://github.com/toml-lang/toml/blob/master/CHANGELOG.md#050--2018-07-11).
2516
2517### Fixed
2518- `cargo fix` will now ignore suggestions that modify multiple files.
2519 [#6402](https://github.com/rust-lang/cargo/pull/6402)
2520- `cargo fix` will now only fix one target at a time, to deal with targets
2521 which share the same source files.
2522 [#6434](https://github.com/rust-lang/cargo/pull/6434)
2cbb701b
EH
2523- Fixed bash completion showing the list of cargo commands.
2524 [#6461](https://github.com/rust-lang/cargo/issues/6461)
2525- `cargo init` will now avoid creating duplicate entries in `.gitignore`
2526 files. [#6521](https://github.com/rust-lang/cargo/pull/6521)
2cbb701b
EH
2527- Builds now attempt to detect if a file is modified in the middle of a
2528 compilation, allowing you to build again and pick up the new changes. This
2529 is done by keeping track of when the compilation *starts* not when it
2530 finishes. Also, [#5919](https://github.com/rust-lang/cargo/pull/5919) was
2531 reverted, meaning that cargo does *not* treat equal filesystem mtimes as
2532 requiring a rebuild. [#6484](https://github.com/rust-lang/cargo/pull/6484)
2533
e77351a5
EH
2534### Nightly only
2535- Allow using registry *names* in `[patch]` tables instead of just URLs.
2536 [#6456](https://github.com/rust-lang/cargo/pull/6456)
2537- `cargo metadata` added the `registry` key for dependencies.
2538 [#6500](https://github.com/rust-lang/cargo/pull/6500)
2539- Registry names are now restricted to the same style as
2540 package names (alphanumeric, `-` and `_` characters).
2541 [#6469](https://github.com/rust-lang/cargo/pull/6469)
2542- `cargo login` now displays the `/me` URL from the registry config.
2543 [#6466](https://github.com/rust-lang/cargo/pull/6466)
2544- `cargo login --registry=NAME` now supports interactive input for the token.
2545 [#6466](https://github.com/rust-lang/cargo/pull/6466)
2546- Registries may now elide the `api` key from `config.json` to indicate they
2547 do not support API access.
2548 [#6466](https://github.com/rust-lang/cargo/pull/6466)
2549- Fixed panic when using `--message-format=json` with metabuild.
2550 [#6432](https://github.com/rust-lang/cargo/pull/6432)
2551- Fixed detection of publishing to crates.io when using alternate registries.
2552 [#6525](https://github.com/rust-lang/cargo/pull/6525)
2553
2cbb701b
EH
2554## Cargo 1.32 (2019-01-17)
2555[339d9f9c...8610973a](https://github.com/rust-lang/cargo/compare/339d9f9c...8610973a)
2556
2557### Added
2cbb701b
EH
2558- Registries may now display warnings after a successful publish.
2559 [#6303](https://github.com/rust-lang/cargo/pull/6303)
2560- Added a [glossary](https://doc.rust-lang.org/cargo/appendix/glossary.html)
2561 to the documentation. [#6321](https://github.com/rust-lang/cargo/pull/6321)
2562- Added the alias `c` for `cargo check`.
2563 [#6218](https://github.com/rust-lang/cargo/pull/6218)
2cbb701b
EH
2564
2565### Changed
2566- 🔥 HTTP/2 multiplexing is now enabled by default. The `http.multiplexing`
2567 config value may be used to disable it.
2568 [#6271](https://github.com/rust-lang/cargo/pull/6271)
2569- Use ANSI escape sequences to clear lines instead of spaces.
2570 [#6233](https://github.com/rust-lang/cargo/pull/6233)
2571- Disable git templates when checking out git dependencies, which can cause
2572 problems. [#6252](https://github.com/rust-lang/cargo/pull/6252)
2573- Include the `--update-head-ok` git flag when using the
2574 `net.git-fetch-with-cli` option. This can help prevent failures when
2575 fetching some repositories.
2576 [#6250](https://github.com/rust-lang/cargo/pull/6250)
2577- When extracting a crate during the verification step of `cargo package`, the
2578 filesystem mtimes are no longer set, which was failing on some rare
2579 filesystems. [#6257](https://github.com/rust-lang/cargo/pull/6257)
2580- `crate-type = ["proc-macro"]` is now treated the same as `proc-macro = true`
2581 in `Cargo.toml`. [#6256](https://github.com/rust-lang/cargo/pull/6256)
2582- An error is raised if `dependencies`, `features`, `target`, or `badges` is
2583 set in a virtual workspace. Warnings are displayed if `replace` or `patch`
2584 is used in a workspace member.
2585 [#6276](https://github.com/rust-lang/cargo/pull/6276)
2586- Improved performance of the resolver in some cases.
2587 [#6283](https://github.com/rust-lang/cargo/pull/6283)
2588 [#6366](https://github.com/rust-lang/cargo/pull/6366)
2589- `.rmeta` files are no longer hard-linked into the base target directory
2590 (`target/debug`). [#6292](https://github.com/rust-lang/cargo/pull/6292)
2591- A warning is issued if multiple targets are built with the same output
2592 filenames. [#6308](https://github.com/rust-lang/cargo/pull/6308)
2593- When using `cargo build` (without `--release`) benchmarks are now built
2594 using the "test" profile instead of "bench". This makes it easier to debug
2595 benchmarks, and avoids confusing behavior.
2596 [#6309](https://github.com/rust-lang/cargo/pull/6309)
2597- User aliases may now override built-in aliases (`b`, `r`, `t`, and `c`).
2598 [#6259](https://github.com/rust-lang/cargo/pull/6259)
2599- Setting `autobins=false` now disables auto-discovery of inferred targets.
2600 [#6329](https://github.com/rust-lang/cargo/pull/6329)
2601- `cargo verify-project` will now fail on stable if the project uses unstable
2602 features. [#6326](https://github.com/rust-lang/cargo/pull/6326)
2603- Platform targets with an internal `.` within the name are now allowed.
2604 [#6255](https://github.com/rust-lang/cargo/pull/6255)
2605- `cargo clean --release` now only deletes the release directory.
2606 [#6349](https://github.com/rust-lang/cargo/pull/6349)
2607
2608### Fixed
2609- Avoid adding extra angle brackets in email address for `cargo new`.
2610 [#6243](https://github.com/rust-lang/cargo/pull/6243)
2611- The progress bar is disabled if the CI environment variable is set.
2612 [#6281](https://github.com/rust-lang/cargo/pull/6281)
2613- Avoid retaining all rustc output in memory.
2614 [#6289](https://github.com/rust-lang/cargo/pull/6289)
2615- If JSON parsing fails, and rustc exits nonzero, don't lose the parse failure
2616 message. [#6290](https://github.com/rust-lang/cargo/pull/6290)
2cbb701b
EH
2617- Fixed renaming a project directory with build scripts.
2618 [#6328](https://github.com/rust-lang/cargo/pull/6328)
2619- Fixed `cargo run --example NAME` to work correctly if the example sets
2620 `crate_type = ["bin"]`.
2621 [#6330](https://github.com/rust-lang/cargo/pull/6330)
2622- Fixed issue with `cargo package` git discovery being too aggressive. The
2623 `--allow-dirty` now completely disables the git repo checks.
2624 [#6280](https://github.com/rust-lang/cargo/pull/6280)
2625- Fixed build change tracking for `[patch]` deps which resulted in `cargo
2626 build` rebuilding when it shouldn't.
2627 [#6493](https://github.com/rust-lang/cargo/pull/6493)
2628
e77351a5
EH
2629### Nightly only
2630- Allow usernames in registry URLs.
2631 [#6242](https://github.com/rust-lang/cargo/pull/6242)
2632- Added `"compile_mode"` key to the build-plan JSON structure to be able to
2633 distinguish running a custom build script versus compiling the build script.
2634 [#6331](https://github.com/rust-lang/cargo/pull/6331)
2635- `--out-dir` no longer copies over build scripts.
2636 [#6300](https://github.com/rust-lang/cargo/pull/6300)
2637
30125600 2638## Cargo 1.31 (2018-12-06)
2cbb701b
EH
2639[36d96825...339d9f9c](https://github.com/rust-lang/cargo/compare/36d96825...339d9f9c)
2640
2641### Added
2642- 🔥 Stabilized support for the 2018 edition.
2643 [#5984](https://github.com/rust-lang/cargo/pull/5984)
2644 [#5989](https://github.com/rust-lang/cargo/pull/5989)
2645- 🔥 Added the ability to [rename
2646 dependencies](https://doc.rust-lang.org/1.31.0/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml)
2647 in Cargo.toml. [#6319](https://github.com/rust-lang/cargo/pull/6319)
2648- 🔥 Added support for HTTP/2 pipelining and multiplexing. Set the
2649 `http.multiplexing` config value to enable.
2650 [#6005](https://github.com/rust-lang/cargo/pull/6005)
2cbb701b
EH
2651- Added `http.debug` configuration value to debug HTTP connections. Use
2652 `CARGO_HTTP_DEBUG=true RUST_LOG=cargo::ops::registry cargo build` to display
2653 the debug information. [#6166](https://github.com/rust-lang/cargo/pull/6166)
2654- `CARGO_PKG_REPOSITORY` environment variable is set with the repository value
2655 from `Cargo.toml` when building .
2656 [#6096](https://github.com/rust-lang/cargo/pull/6096)
2657
2658### Changed
2659- `cargo test --doc` now rejects other flags instead of ignoring them.
2660 [#6037](https://github.com/rust-lang/cargo/pull/6037)
2661- `cargo install` ignores `~/.cargo/config`.
2662 [#6026](https://github.com/rust-lang/cargo/pull/6026)
2663- `cargo version --verbose` is now the same as `cargo -vV`.
2664 [#6076](https://github.com/rust-lang/cargo/pull/6076)
2665- Comments at the top of `Cargo.lock` are now preserved.
2666 [#6181](https://github.com/rust-lang/cargo/pull/6181)
2667- When building in "very verbose" mode (`cargo build -vv`), build script
2668 output is prefixed with the package name and version, such as `[foo 0.0.1]`.
2669 [#6164](https://github.com/rust-lang/cargo/pull/6164)
2670- If `cargo fix --broken-code` fails to compile after fixes have been applied,
2671 the files are no longer reverted and are left in their broken state.
2672 [#6316](https://github.com/rust-lang/cargo/pull/6316)
2673
2674### Fixed
2675- Windows: Pass Ctrl-C to the process with `cargo run`.
2676 [#6004](https://github.com/rust-lang/cargo/pull/6004)
2677- macOS: Fix bash completion.
2678 [#6038](https://github.com/rust-lang/cargo/pull/6038)
2679- Support arbitrary toolchain names when completing `+toolchain` in bash
2680 completion. [#6038](https://github.com/rust-lang/cargo/pull/6038)
2681- Fixed edge cases in the resolver, when backtracking on failed dependencies.
2682 [#5988](https://github.com/rust-lang/cargo/pull/5988)
2683- Fixed `cargo test --all-targets` running lib tests three times.
2684 [#6039](https://github.com/rust-lang/cargo/pull/6039)
2685- Fixed publishing renamed dependencies to crates.io.
2686 [#5993](https://github.com/rust-lang/cargo/pull/5993)
2687- Fixed `cargo install` on a git repo with multiple binaries.
2688 [#6060](https://github.com/rust-lang/cargo/pull/6060)
2689- Fixed deeply nested JSON emitted by rustc being lost.
2690 [#6081](https://github.com/rust-lang/cargo/pull/6081)
2691- Windows: Fix locking msys terminals to 60 characters.
2692 [#6122](https://github.com/rust-lang/cargo/pull/6122)
2693- Fixed renamed dependencies with dashes.
2694 [#6140](https://github.com/rust-lang/cargo/pull/6140)
2695- Fixed linking against the wrong dylib when the dylib existed in both
2696 `target/debug` and `target/debug/deps`.
2697 [#6167](https://github.com/rust-lang/cargo/pull/6167)
2698- Fixed some unnecessary recompiles when `panic=abort` is used.
2699 [#6170](https://github.com/rust-lang/cargo/pull/6170)
2700
e77351a5
EH
2701### Nightly only
2702- Added `--registry` flag to `cargo install`.
2703 [#6128](https://github.com/rust-lang/cargo/pull/6128)
2704- Added `registry.default` configuration value to specify the
2705 default registry to use if `--registry` flag is not passed.
2706 [#6135](https://github.com/rust-lang/cargo/pull/6135)
2707- Added `--registry` flag to `cargo new` and `cargo init`.
2708 [#6135](https://github.com/rust-lang/cargo/pull/6135)
2709
30125600 2710## Cargo 1.30 (2018-10-25)
2cbb701b
EH
2711[524a578d...36d96825](https://github.com/rust-lang/cargo/compare/524a578d...36d96825)
2712
2713### Added
2714- 🔥 Added an animated progress bar shows progress during building.
2715 [#5995](https://github.com/rust-lang/cargo/pull/5995/)
2716- Added `resolve.nodes.deps` key to `cargo metadata`, which includes more
2717 information about resolved dependencies, and properly handles renamed
2718 dependencies. [#5871](https://github.com/rust-lang/cargo/pull/5871)
2719- When creating a package, provide more detail with `-v` when failing to
2720 discover if files are dirty in a git repository. Also fix a problem with
2721 discovery on Windows. [#5858](https://github.com/rust-lang/cargo/pull/5858)
2722- Filters like `--bin`, `--test`, `--example`, `--bench`, or `--lib` can be
2723 used in a workspace without selecting a specific package.
2724 [#5873](https://github.com/rust-lang/cargo/pull/5873)
2725- `cargo run` can be used in a workspace without selecting a specific package.
2726 [#5877](https://github.com/rust-lang/cargo/pull/5877)
2727- `cargo doc --message-format=json` now outputs JSON messages from rustdoc.
2728 [#5878](https://github.com/rust-lang/cargo/pull/5878)
2729- Added `--message-format=short` to show one-line messages.
2730 [#5879](https://github.com/rust-lang/cargo/pull/5879)
2731- Added `.cargo_vcs_info.json` file to `.crate` packages that captures the
2732 current git hash. [#5886](https://github.com/rust-lang/cargo/pull/5886)
2733- Added `net.git-fetch-with-cli` configuration option to use the `git`
2734 executable to fetch repositories instead of using the built-in libgit2
2735 library. [#5914](https://github.com/rust-lang/cargo/pull/5914)
2736- Added `required-features` to `cargo metadata`.
2737 [#5902](https://github.com/rust-lang/cargo/pull/5902)
2738- `cargo uninstall` within a package will now uninstall that package.
2739 [#5927](https://github.com/rust-lang/cargo/pull/5927)
2cbb701b
EH
2740- Added `--allow-staged` flag to `cargo fix` to allow it to run if files are
2741 staged in git. [#5943](https://github.com/rust-lang/cargo/pull/5943)
2742- Added `net.low-speed-limit` config value, and also honor `net.timeout` for
2743 http operations. [#5957](https://github.com/rust-lang/cargo/pull/5957)
2744- Added `--edition` flag to `cargo new`.
2745 [#5984](https://github.com/rust-lang/cargo/pull/5984)
2746- Temporarily stabilized 2018 edition support for the duration of the beta.
2747 [#5984](https://github.com/rust-lang/cargo/pull/5984)
2748 [#5989](https://github.com/rust-lang/cargo/pull/5989)
2749- Added support for `target.'cfg(…)'.runner` config value to specify the
9c892e6c 2750 run/test/bench runner for targets that use config expressions.
2cbb701b
EH
2751 [#5959](https://github.com/rust-lang/cargo/pull/5959)
2752
2753### Changed
2754- Windows: `cargo run` will not kill child processes when the main process
2755 exits. [#5887](https://github.com/rust-lang/cargo/pull/5887)
2756- Switched to the `opener` crate to open a web browser with `cargo doc
2757 --open`. This should more reliably select the system-preferred browser on
2758 all platforms. [#5888](https://github.com/rust-lang/cargo/pull/5888)
2759- Equal file mtimes now cause a target to be rebuilt. Previously only if files
2760 were strictly *newer* than the last build would it cause a rebuild.
2761 [#5919](https://github.com/rust-lang/cargo/pull/5919)
2762- Ignore `build.target` config value when running `cargo install`.
2763 [#5874](https://github.com/rust-lang/cargo/pull/5874)
2764- Ignore `RUSTC_WRAPPER` for `cargo fix`.
2765 [#5983](https://github.com/rust-lang/cargo/pull/5983)
2766- Ignore empty `RUSTC_WRAPPER`.
2767 [#5985](https://github.com/rust-lang/cargo/pull/5985)
2768
2769### Fixed
2770- Fixed error when creating a package with an edition field in `Cargo.toml`.
2771 [#5908](https://github.com/rust-lang/cargo/pull/5908)
2772- More consistently use relative paths for path dependencies in a workspace.
2773 [#5935](https://github.com/rust-lang/cargo/pull/5935)
2774- `cargo fix` now always runs, even if it was run previously.
2775 [#5944](https://github.com/rust-lang/cargo/pull/5944)
2776- Windows: Attempt to more reliably detect terminal width. msys-based
2777 terminals are forced to 60 characters wide.
2778 [#6010](https://github.com/rust-lang/cargo/pull/6010)
2779- Allow multiple target flags with `cargo doc --document-private-items`.
2780 [6022](https://github.com/rust-lang/cargo/pull/6022)
e77351a5
EH
2781
2782### Nightly only
2783- Added
2784 [metabuild](https://doc.rust-lang.org/1.30.0/cargo/reference/unstable.html#metabuild).
2785 [#5628](https://github.com/rust-lang/cargo/pull/5628)