|
1 | 1 | # Changelog
|
2 | 2 |
|
3 | 3 | ## Cargo 1.85 (2025-02-20)
|
4 |
| -[66221abd...rust-1.84.0](https://github.com/rust-lang/cargo/compare/66221abd...rust-1.84.0) |
| 4 | +[66221abd...rust-1.85.0](https://github.com/rust-lang/cargo/compare/66221abd...rust-1.85.0) |
5 | 5 |
|
6 | 6 | ### Added
|
7 | 7 |
|
8 | 8 | - 🎉 Cargo now supports the 2024 edition.
|
9 | 9 | More information is available in the [edition guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html).
|
10 | 10 | [#14828](https://github.com/rust-lang/cargo/pull/14828)
|
| 11 | +- cargo-tree: The `--depth` flag now accepts `workspace`, |
| 12 | + which shows only dependencies that are members of the current workspace. |
| 13 | + [#14928](https://github.com/rust-lang/cargo/pull/14928) |
| 14 | +- Build scripts now receive a new environment variable, `CARGO_CFG_FEATURE`, |
| 15 | + which contains each activated feature of the package being built. |
| 16 | + [#14902](https://github.com/rust-lang/cargo/pull/14902) |
| 17 | +- perf: Dependency resolution is now faster due to a more efficient hash for `ActivationsKey` |
| 18 | + [#14915](https://github.com/rust-lang/cargo/pull/14915) |
11 | 19 |
|
12 | 20 | ### Changed
|
13 | 21 |
|
| 22 | +- ❗️ cargo-rustc: Trailing flags now have higher precedence. |
| 23 | + This behavior was nightly-only since 1.83 and is now stabilized. |
| 24 | + [#14900](https://github.com/rust-lang/cargo/pull/14900) |
| 25 | +- ❗️ Cargo now uses a cross-platform hash algorithm from `rustc-stable-hash`. |
| 26 | + As a result, the hash part of paths to dependency caches |
| 27 | + (e.g., `$CARGO_HOME/registry/index/index.crates.io-<hash>`) will change. |
| 28 | + This will trigger re-downloads of registry indices and `.crate` tarballs, |
| 29 | + as well as re-cloning of Git dependencies. |
| 30 | + [#14917](https://github.com/rust-lang/cargo/pull/14917) |
14 | 31 | - Added a future-incompatibility warning for keywords in `cfg`s in Cargo.toml
|
15 | 32 | and Cargo configuration. `cfg`s with keywords like `cfg(true)` and `cfg(false)`
|
16 | 33 | were incorrectly accepted. For backward compatibility, support for raw
|
17 | 34 | identifiers has been introduced; for example, use `cfg(r#true)` instead.
|
18 | 35 | [#14671](https://github.com/rust-lang/cargo/pull/14671)
|
| 36 | +- Dependency resolution now provides richer error messages explaining why some versions were rejected, unmatched, or invalid. |
| 37 | + [#14897](https://github.com/rust-lang/cargo/pull/14897) |
| 38 | + [#14921](https://github.com/rust-lang/cargo/pull/14921) |
| 39 | + [#14923](https://github.com/rust-lang/cargo/pull/14923) |
| 40 | + [#14927](https://github.com/rust-lang/cargo/pull/14927) |
| 41 | +- cargo-doc: improve the error message when `--open`ing a doc while no doc generated. |
| 42 | + [#14969](https://github.com/rust-lang/cargo/pull/14969) |
| 43 | +- cargo-package: warn if symlinks checked out as plain text files |
| 44 | + [#14994](https://github.com/rust-lang/cargo/pull/14994) |
| 45 | +- cargo-package: Shows dirty file paths relative to the Git working directory. |
| 46 | + [#14968](https://github.com/rust-lang/cargo/pull/14968) |
| 47 | + [#14970](https://github.com/rust-lang/cargo/pull/14970) |
19 | 48 |
|
20 | 49 | ### Fixed
|
21 | 50 |
|
22 | 51 | - Set `GIT_DIR` to ensure compatibility with bare repositories
|
23 | 52 | for `net.git-fetch-with-cli=true`.
|
24 | 53 | [#14860](https://github.com/rust-lang/cargo/pull/14860)
|
| 54 | +- Fixed workspace Cargo.toml modification didn't invalidate build cache. |
| 55 | + [#14973](https://github.com/rust-lang/cargo/pull/14973) |
| 56 | +- Prevented build caches from being discarded after changes to `RUSTFLAGS`. |
| 57 | + [#14830](https://github.com/rust-lang/cargo/pull/14830) |
| 58 | + [#14898](https://github.com/rust-lang/cargo/pull/14898) |
| 59 | +- cargo-add: Don't select yanked versions when normalizing names. |
| 60 | + [#14895](https://github.com/rust-lang/cargo/pull/14895) |
| 61 | +- cargo-fix: Migrate workspace dependencies to the 2024 edition also for virtual manifests. |
| 62 | + [#14890](https://github.com/rust-lang/cargo/pull/14890) |
| 63 | +- cargo-package: Verify the VCS status of `package.readme` and `package.license-file` |
| 64 | + when they point to paths outside the current package root. |
| 65 | + [#14966](https://github.com/rust-lang/cargo/pull/14966) |
| 66 | +- cargo-package: assure possibly blocking non-files (like FIFOs) won't be |
| 67 | + picked up for publishing. |
| 68 | + [#14977](https://github.com/rust-lang/cargo/pull/14977) |
25 | 69 |
|
26 | 70 | ### Nightly only
|
27 | 71 |
|
28 |
| -- `-Zbuild-std`: Check if build target supports `std`. |
| 72 | +- `path-bases`: Support bases in `[patch]`es in virtual manifests |
| 73 | + [#14931](https://github.com/rust-lang/cargo/pull/14931) |
| 74 | +- `unit-graph`: Use the configured shell to print output. |
| 75 | + [#14926](https://github.com/rust-lang/cargo/pull/14926) |
| 76 | +- `-Zbuild-std`: Check if the build target supports `std` |
| 77 | + by probing the `metadata.std` field in the target spec JSON. |
29 | 78 | [#14183](https://github.com/rust-lang/cargo/pull/14183)
|
| 79 | + [#14938](https://github.com/rust-lang/cargo/pull/14938) |
| 80 | + [#14899](https://github.com/rust-lang/cargo/pull/14899) |
30 | 81 | - `-Zbuild-std`: always link to std when testing proc-macros.
|
31 | 82 | [#14850](https://github.com/rust-lang/cargo/pull/14850)
|
32 | 83 | [#14861](https://github.com/rust-lang/cargo/pull/14861)
|
| 84 | +- `-Zbuild-std`: clean up build-std tests |
| 85 | + [#14943](https://github.com/rust-lang/cargo/pull/14943) |
| 86 | + [#14933](https://github.com/rust-lang/cargo/pull/14933) |
| 87 | + [#14896](https://github.com/rust-lang/cargo/pull/14896) |
| 88 | +- `-Zbuild-std`: Hash relative paths to std workspace instead of absolute paths. |
| 89 | + [#14951](https://github.com/rust-lang/cargo/pull/14951) |
33 | 90 | - `-Zpackage-workspace`: Allow dry-run of a non-bumped workspace.
|
34 | 91 | [#14847](https://github.com/rust-lang/cargo/pull/14847)
|
35 | 92 | - `-Zscript`: Allow adding/removing dependencies from cargo scripts
|
36 | 93 | [#14857](https://github.com/rust-lang/cargo/pull/14857)
|
37 | 94 | - `-Zscript`: Migrate cargo script manifests across editions
|
38 | 95 | [#14864](https://github.com/rust-lang/cargo/pull/14864)
|
| 96 | +- `-Zscript`: Don't override the release profile. |
| 97 | + [#14925](https://github.com/rust-lang/cargo/pull/14925) |
| 98 | +- `-Ztrim-paths`: Use `Path::push` to construct the `remap-path-prefix` flag. |
| 99 | + [#14908](https://github.com/rust-lang/cargo/pull/14908) |
39 | 100 |
|
40 | 101 | ### Documentation
|
41 | 102 |
|
42 | 103 | - Clarify how `cargo::metadata` env var is selected.
|
43 | 104 | [#14842](https://github.com/rust-lang/cargo/pull/14842)
|
44 | 105 | - cargo-info: Remove references to the default registry in `cargo-info` docs
|
45 | 106 | [#14880](https://github.com/rust-lang/cargo/pull/14880)
|
| 107 | +- contrib: add missing argument to Rustup Cargo workaround |
| 108 | + [#14954](https://github.com/rust-lang/cargo/pull/14954) |
| 109 | +- SemVer: Add section on RPIT capturing |
| 110 | + [#14849](https://github.com/rust-lang/cargo/pull/14849) |
46 | 111 |
|
47 | 112 | ### Internal
|
48 | 113 |
|
| 114 | +- Add the `test` cfg as a well known cfg before of compiler change. |
| 115 | + [#14963](https://github.com/rust-lang/cargo/pull/14963) |
| 116 | +- Enable triagebot merge conflict notifications |
| 117 | + [#14972](https://github.com/rust-lang/cargo/pull/14972) |
| 118 | +- Limit release trigger to `0.*` tags |
| 119 | + [#14940](https://github.com/rust-lang/cargo/pull/14940) |
| 120 | +- Simplify `SourceID` Hash. |
| 121 | + [#14800](https://github.com/rust-lang/cargo/pull/14800) |
| 122 | +- build-rs: Automatically emits `rerun-if-env-changed` |
| 123 | + when accessing environment variables Cargo sets for build script executions. |
| 124 | + [#14911](https://github.com/rust-lang/cargo/pull/14911) |
| 125 | +- build-rs: Correctly refer to the item in assert |
| 126 | + [#14913](https://github.com/rust-lang/cargo/pull/14913) |
| 127 | +- build-rs: Add the 'error' directive |
| 128 | + [#14910](https://github.com/rust-lang/cargo/pull/14910) |
| 129 | +- build-rs: Remove meaningless 'cargo_cfg_debug_assertions' |
| 130 | + [#14901](https://github.com/rust-lang/cargo/pull/14901) |
| 131 | +- cargo-package: split `cargo_package` to modules |
| 132 | + [#14959](https://github.com/rust-lang/cargo/pull/14959) |
| 133 | + [#14982](https://github.com/rust-lang/cargo/pull/14982) |
49 | 134 | - cargo-test-support: `requires` attribute accepts string literals for cmds
|
50 | 135 | [#14875](https://github.com/rust-lang/cargo/pull/14875)
|
51 | 136 | - cargo-test-support: Switch from 'exec_with_output' to 'run'
|
52 | 137 | [#14848](https://github.com/rust-lang/cargo/pull/14848)
|
| 138 | +- cargo-test-support: track caller for `.crate` file publish verification |
| 139 | + [#14992](https://github.com/rust-lang/cargo/pull/14992) |
53 | 140 | - test: Verify `-Cmetadata` directly, not through `-Cextra-filename`
|
54 | 141 | [#14846](https://github.com/rust-lang/cargo/pull/14846)
|
55 | 142 | - test: ensure PGO works
|
56 | 143 | [#14859](https://github.com/rust-lang/cargo/pull/14859)
|
57 | 144 | [#14874](https://github.com/rust-lang/cargo/pull/14874)
|
| 145 | + [#14887](https://github.com/rust-lang/cargo/pull/14887) |
58 | 146 | - Update dependencies.
|
59 | 147 | [#14867](https://github.com/rust-lang/cargo/pull/14867)
|
60 | 148 | [#14871](https://github.com/rust-lang/cargo/pull/14871)
|
61 | 149 | [#14878](https://github.com/rust-lang/cargo/pull/14878)
|
62 | 150 | [#14879](https://github.com/rust-lang/cargo/pull/14879)
|
| 151 | + [#14975](https://github.com/rust-lang/cargo/pull/14975) |
63 | 152 |
|
64 | 153 | ## Cargo 1.84 (2025-01-09)
|
65 | 154 | [15fbd2f6...rust-1.84.0](https://github.com/rust-lang/cargo/compare/15fbd2f6...rust-1.84.0)
|
|
0 commit comments