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