|
1 | 1 | # Changelog
|
2 | 2 |
|
| 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) |
| 5 | + |
| 6 | +### Added |
| 7 | + |
| 8 | +- 🎉 Cargo now supports the 2024 edition. |
| 9 | + More information is available in the [edition guide](https://doc.rust-lang.org/nightly/edition-guide/rust-2024/index.html). |
| 10 | + [#14828](https://github.com/rust-lang/cargo/pull/14828) |
| 11 | + |
| 12 | +### Changed |
| 13 | + |
| 14 | +- Added a future-incompatibility warning for keywords in `cfg`s in Cargo.toml |
| 15 | + and Cargo configuration. `cfg`s with keywords like `cfg(true)` and `cfg(false)` |
| 16 | + were incorrectly accepted. For backward compatibility, support for raw |
| 17 | + identifiers has been introduced; for example, use `cfg(r#true)` instead. |
| 18 | + [#14671](https://github.com/rust-lang/cargo/pull/14671) |
| 19 | + |
| 20 | +### Fixed |
| 21 | + |
| 22 | +- Set `GIT_DIR` to ensure compatibility with bare repositories |
| 23 | + for `net.git-fetch-with-cli=true`. |
| 24 | + [#14860](https://github.com/rust-lang/cargo/pull/14860) |
| 25 | + |
| 26 | +### Nightly only |
| 27 | + |
| 28 | +- `-Zbuild-std`: Check if build target supports `std`. |
| 29 | + [#14183](https://github.com/rust-lang/cargo/pull/14183) |
| 30 | +- `-Zbuild-std`: always link to std when testing proc-macros. |
| 31 | + [#14850](https://github.com/rust-lang/cargo/pull/14850) |
| 32 | + [#14861](https://github.com/rust-lang/cargo/pull/14861) |
| 33 | +- `-Zpackage-workspace`: Allow dry-run of a non-bumped workspace. |
| 34 | + [#14847](https://github.com/rust-lang/cargo/pull/14847) |
| 35 | +- `-Zscript`: Allow adding/removing dependencies from cargo scripts |
| 36 | + [#14857](https://github.com/rust-lang/cargo/pull/14857) |
| 37 | +- `-Zscript`: Migrate cargo script manifests across editions |
| 38 | + [#14864](https://github.com/rust-lang/cargo/pull/14864) |
| 39 | + |
| 40 | +### Documentation |
| 41 | + |
| 42 | +- Clarify how `cargo::metadata` env var is selected. |
| 43 | + [#14842](https://github.com/rust-lang/cargo/pull/14842) |
| 44 | +- cargo-info: Remove references to the default registry in `cargo-info` docs |
| 45 | + [#14880](https://github.com/rust-lang/cargo/pull/14880) |
| 46 | + |
| 47 | +### Internal |
| 48 | + |
| 49 | +- cargo-test-support: `requires` attribute accepts string literals for cmds |
| 50 | + [#14875](https://github.com/rust-lang/cargo/pull/14875) |
| 51 | +- cargo-test-support: Switch from 'exec_with_output' to 'run' |
| 52 | + [#14848](https://github.com/rust-lang/cargo/pull/14848) |
| 53 | +- test: Verify `-Cmetadata` directly, not through `-Cextra-filename` |
| 54 | + [#14846](https://github.com/rust-lang/cargo/pull/14846) |
| 55 | +- test: ensure PGO works |
| 56 | + [#14859](https://github.com/rust-lang/cargo/pull/14859) |
| 57 | + [#14874](https://github.com/rust-lang/cargo/pull/14874) |
| 58 | +- Update dependencies. |
| 59 | + [#14867](https://github.com/rust-lang/cargo/pull/14867) |
| 60 | + [#14871](https://github.com/rust-lang/cargo/pull/14871) |
| 61 | + [#14878](https://github.com/rust-lang/cargo/pull/14878) |
| 62 | + [#14879](https://github.com/rust-lang/cargo/pull/14879) |
| 63 | + |
3 | 64 | ## Cargo 1.84 (2025-01-09)
|
4 |
| -[15fbd2f6...HEAD](https://github.com/rust-lang/cargo/compare/15fbd2f6...HEAD) |
| 65 | +[15fbd2f6...rust-1.84.0](https://github.com/rust-lang/cargo/compare/15fbd2f6...rust-1.84.0) |
5 | 66 |
|
6 | 67 | ### Added
|
7 | 68 |
|
| 69 | +- 🎉 Stabilize resolver v3, a.k.a the MSRV-aware dependency resolver. |
| 70 | + The stabilization includes `package.resolver = "3"` in Cargo.toml, |
| 71 | + and the `[resolver]` table in Cargo configuration. |
| 72 | + ([RFC 3537](https://github.com/rust-lang/rfcs/blob/master/text/3537-msrv-resolver.md)) |
| 73 | + ([manifest docs](https://doc.rust-lang.org/nightly/cargo/reference/resolver.html#resolver-versions)) |
| 74 | + ([config docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#resolver)) |
| 75 | + [#14639](https://github.com/rust-lang/cargo/pull/14639) |
| 76 | + [#14662](https://github.com/rust-lang/cargo/pull/14662) |
| 77 | + [#14711](https://github.com/rust-lang/cargo/pull/14711) |
| 78 | + [#14725](https://github.com/rust-lang/cargo/pull/14725) |
| 79 | + [#14748](https://github.com/rust-lang/cargo/pull/14748) |
| 80 | + [#14753](https://github.com/rust-lang/cargo/pull/14753) |
| 81 | + [#14754](https://github.com/rust-lang/cargo/pull/14754) |
| 82 | +- Added a new build script invocation `cargo::error=MESSAGE` to report error messages. |
| 83 | + ([docs](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#cargo-error)) |
| 84 | + [#14743](https://github.com/rust-lang/cargo/pull/14743) |
| 85 | + |
8 | 86 | ### Changed
|
9 | 87 |
|
10 |
| -- Pass `--no-tags` by default to git CLI when `net.git-fetch-with-cli = true`. |
| 88 | +- ❗️ cargo-publish: Always include Cargo.lock in published crates. |
| 89 | + Originally it was only included for packages that have executables or examples |
| 90 | + for use with `cargo install`. |
| 91 | + [#14815](https://github.com/rust-lang/cargo/pull/14815) |
| 92 | +- Dependency resolver performance improvements, including shared caching, |
| 93 | + reduced iteration overhead, and removing redundant fetches and clones. |
| 94 | + [#14663](https://github.com/rust-lang/cargo/pull/14663) |
| 95 | + [#14690](https://github.com/rust-lang/cargo/pull/14690) |
| 96 | + [#14692](https://github.com/rust-lang/cargo/pull/14692) |
| 97 | + [#14694](https://github.com/rust-lang/cargo/pull/14694) |
| 98 | +- Deprecate `cargo verify-project`. |
| 99 | + [#14736](https://github.com/rust-lang/cargo/pull/14736) |
| 100 | +- Add source replacement info when no matching package found during dependency resolving. |
| 101 | + [#14715](https://github.com/rust-lang/cargo/pull/14715) |
| 102 | +- Hint for using `crates-io` when `[patch.crates.io]` found. |
| 103 | + [#14700](https://github.com/rust-lang/cargo/pull/14700) |
| 104 | +- Normalize source paths of Cargo targets for better diagnostics. |
| 105 | + [#14497](https://github.com/rust-lang/cargo/pull/14497) |
| 106 | + [#14750](https://github.com/rust-lang/cargo/pull/14750) |
| 107 | +- Allow registries to omit empty/default fields in index metadata JSON. |
| 108 | + Due to backward compatibility, crates.io continues to emit them. |
| 109 | + [#14838](https://github.com/rust-lang/cargo/pull/14838) |
| 110 | + [#14839](https://github.com/rust-lang/cargo/pull/14839) |
| 111 | +- cargo-doc: display env vars in extra verbose mode. |
| 112 | + [#14812](https://github.com/rust-lang/cargo/pull/14812) |
| 113 | +- cargo-fix: replace special-case handling of duplicate insert-only replacement. |
| 114 | + [#14765](https://github.com/rust-lang/cargo/pull/14765) |
| 115 | + [#14782](https://github.com/rust-lang/cargo/pull/14782) |
| 116 | +- cargo-remove: when a dependency is not found, try suggesting other dependencies |
| 117 | + with similar names. |
| 118 | + [#14818](https://github.com/rust-lang/cargo/pull/14818) |
| 119 | +- git: skip unnecessary submodule validations for fresh checkouts on Git dependencies. |
| 120 | + [#14605](https://github.com/rust-lang/cargo/pull/14605) |
| 121 | +- git: Enhanced the error message for fetching Git dependencies when refspec not found. |
| 122 | + [#14806](https://github.com/rust-lang/cargo/pull/14806) |
| 123 | +- git: Pass `--no-tags` by default to git CLI when `net.git-fetch-with-cli = true`. |
11 | 124 | [#14688](https://github.com/rust-lang/cargo/pull/14688)
|
12 |
| -- Several resolver performance enhancements, including |
13 |
| - - Use `rustc-hash` to speed up resolver |
14 |
| - [#14663](https://github.com/rust-lang/cargo/pull/14663) |
15 |
| - - Share conflict cache between activation retries |
16 |
| - [#14692](https://github.com/rust-lang/cargo/pull/14692) |
17 |
| - - Avoid cloning when iterating using `RcVecIter` |
18 |
| - [#14690](https://github.com/rust-lang/cargo/pull/14690) |
19 | 125 |
|
20 | 126 | ### Fixed
|
21 | 127 |
|
| 128 | +- Fixed old Cargos failing to read the newer format of dep-info in build caches. |
| 129 | + [#14751](https://github.com/rust-lang/cargo/pull/14751) |
| 130 | + [#14745](https://github.com/rust-lang/cargo/pull/14745) |
| 131 | +- Fixed rebuild detection not respecting changes in the `[env]` table. |
| 132 | + [#14701](https://github.com/rust-lang/cargo/pull/14701) |
| 133 | + [#14730](https://github.com/rust-lang/cargo/pull/14730) |
| 134 | +- cargo-fix: Added transactional semantics to `rustfix` to keep code fix in a |
| 135 | + valid state when multiple suggestions contain overlapping spans. |
| 136 | + [#14747](https://github.com/rust-lang/cargo/pull/14747) |
| 137 | + |
22 | 138 | ### Nightly only
|
23 | 139 |
|
| 140 | +- The unstable environment variable `CARGO_RUSTC_CURRENT_DIR` has been removed. |
| 141 | + [#14799](https://github.com/rust-lang/cargo/pull/14799) |
| 142 | +- 🔥 Cargo now includes an experimental JSON Schema file for `Cargo.toml` in the source code. |
| 143 | + It helps external tools validate or auto-complete the schema of the manifest. |
| 144 | + ([manifest.schema.json](https://github.com/rust-lang/cargo/blob/master/crates/cargo-util-schemas/manifest.schema.json)) |
| 145 | + [#14683](https://github.com/rust-lang/cargo/pull/14683) |
| 146 | +- 🔥 `Zroot-dir`: A new unstable `-Zroot-dir` flag to configure the path from |
| 147 | + which rustc should be invoked. |
| 148 | + ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#root-dir)) |
| 149 | + [#14752](https://github.com/rust-lang/cargo/pull/14752) |
| 150 | +- 🔥 `-Zwarnings`: A new unstable feature to control how Cargo handles warnings |
| 151 | + via the `build.warnings` configuration field. |
| 152 | + ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#warnings)) |
| 153 | + [#14388](https://github.com/rust-lang/cargo/pull/14388) |
| 154 | + [#14827](https://github.com/rust-lang/cargo/pull/14827) |
| 155 | + [#14836](https://github.com/rust-lang/cargo/pull/14836) |
| 156 | +- `edition2024`: Verify 2024 edition / resolver=3 doesn't affect resolution |
| 157 | + [#14724](https://github.com/rust-lang/cargo/pull/14724) |
| 158 | +- `native-completions`: Include descriptions in zsh |
| 159 | + [#14726](https://github.com/rust-lang/cargo/pull/14726) |
24 | 160 | - `-Zbindeps`: Fix panic when running cargo tree on a package with a cross compiled bindep
|
25 | 161 | [#14593](https://github.com/rust-lang/cargo/pull/14593)
|
26 |
| -- `-Zpackage-workspace`: Support package selection options like `--exclude` in `cargo publish` |
| 162 | +- `-Zbindeps`: download targeted transitive deps of with artifact deps' target platform |
| 163 | + [#14723](https://github.com/rust-lang/cargo/pull/14723) |
| 164 | +- `-Zbuild-std`: Remove the requirement for `--target`. |
| 165 | + [#14317](https://github.com/rust-lang/cargo/pull/14317) |
| 166 | +- `-Zpackage-workspace`: Support package selection options, such as `--exclude`, |
| 167 | + in `cargo publish` |
27 | 168 | [#14659](https://github.com/rust-lang/cargo/pull/14659)
|
28 |
| -- `-Zscript`: Remove the support for accepting `Cargo.toml` |
| 169 | +- `-Zscript`: Remove support for accepting `Cargo.toml`. |
29 | 170 | [#14670](https://github.com/rust-lang/cargo/pull/14670)
|
| 171 | +- `-Zscript`: Change config paths to only check `CARGO_HOME` |
| 172 | + [#14749](https://github.com/rust-lang/cargo/pull/14749) |
| 173 | +- `-Zscript`: Update the frontmatter parser for RFC 3503. |
| 174 | + [#14792](https://github.com/rust-lang/cargo/pull/14792) |
30 | 175 |
|
31 | 176 | ### Documentation
|
32 | 177 |
|
|
38 | 183 | [#14684](https://github.com/rust-lang/cargo/pull/14684)
|
39 | 184 | - Document official external commands: `cargo-clippy`, `cargo-fmt`, and `cargo-miri`.
|
40 | 185 | [#14669](https://github.com/rust-lang/cargo/pull/14669)
|
41 |
| -- Enhanced documentation on dependency resolution |
42 |
| - [#14662](https://github.com/rust-lang/cargo/pull/14662) |
| 186 | + [#14805](https://github.com/rust-lang/cargo/pull/14805) |
| 187 | +- Enhance documentation on environment variables |
| 188 | + [#14676](https://github.com/rust-lang/cargo/pull/14676) |
| 189 | +- Simplify English used in documentations. |
| 190 | + [#14825](https://github.com/rust-lang/cargo/pull/14825) |
| 191 | + [#14829](https://github.com/rust-lang/cargo/pull/14829) |
| 192 | +- A new doc page for deprecated and removed commands. |
| 193 | + [#14739](https://github.com/rust-lang/cargo/pull/14739) |
| 194 | +- cargo-test-support: Document `Execs` assertions based on port effort |
| 195 | + [#14793](https://github.com/rust-lang/cargo/pull/14793) |
43 | 196 |
|
44 | 197 | ### Internal
|
45 | 198 |
|
46 |
| -- Updated to `pulldown-cmark` 0.12.0 |
| 199 | +- 🎉 Migrate `build-rs` crate to the `rust-lang/cargo` repository as an |
| 200 | + intentional artifact of the Cargo team. |
| 201 | + [#14786](https://github.com/rust-lang/cargo/pull/14786) |
| 202 | + [#14817](https://github.com/rust-lang/cargo/pull/14817) |
| 203 | +- Enable transfer feature in triagebot |
| 204 | + [#14777](https://github.com/rust-lang/cargo/pull/14777) |
| 205 | +- clone-on-write when needed for InternedString |
| 206 | + [#14808](https://github.com/rust-lang/cargo/pull/14808) |
| 207 | +- ci: Switch CI from bors to merge queue |
| 208 | + [#14718](https://github.com/rust-lang/cargo/pull/14718) |
| 209 | +- ci: make the `lint-docs` job required |
| 210 | + [#14797](https://github.com/rust-lang/cargo/pull/14797) |
| 211 | +- ci: Check for clippy `correctness` |
| 212 | + [#14796](https://github.com/rust-lang/cargo/pull/14796) |
| 213 | +- ci: Switch matchPackageNames to matchDepNames for renovate |
| 214 | + [#14704](https://github.com/rust-lang/cargo/pull/14704) |
| 215 | +- fingerprint: Track the intent for each use of `UnitHash` |
| 216 | + [#14826](https://github.com/rust-lang/cargo/pull/14826) |
| 217 | +- fingerprint: Add more metadata to `rustc_fingerprint`. |
| 218 | + [#14761](https://github.com/rust-lang/cargo/pull/14761) |
| 219 | +- test: Migrate remaining snapshotting to snapbox |
| 220 | + [#14642](https://github.com/rust-lang/cargo/pull/14642) |
| 221 | + [#14760](https://github.com/rust-lang/cargo/pull/14760) |
| 222 | + [#14781](https://github.com/rust-lang/cargo/pull/14781) |
| 223 | + [#14785](https://github.com/rust-lang/cargo/pull/14785) |
| 224 | + [#14790](https://github.com/rust-lang/cargo/pull/14790) |
| 225 | +- Update dependencies. |
47 | 226 | [#14668](https://github.com/rust-lang/cargo/pull/14668)
|
| 227 | + [#14705](https://github.com/rust-lang/cargo/pull/14705) |
| 228 | + [#14762](https://github.com/rust-lang/cargo/pull/14762) |
| 229 | + [#14766](https://github.com/rust-lang/cargo/pull/14766) |
| 230 | + [#14772](https://github.com/rust-lang/cargo/pull/14772) |
48 | 231 |
|
49 | 232 | ## Cargo 1.83 (2024-11-28)
|
50 | 233 | [8f40fc59...rust-1.83.0](https://github.com/rust-lang/cargo/compare/8f40fc59...rust-1.83.0)
|
|
111 | 294 | - cargo-vendor: trusts the crate version only when it originates from registries.
|
112 | 295 | This causes git dependencies to be re-vendored even if they haven't changed.
|
113 | 296 | [#14530](https://github.com/rust-lang/cargo/pull/14530)
|
| 297 | +- cargo-publish: Downgrade version-exists error to warning on dry-run |
| 298 | + [#14742](https://github.com/rust-lang/cargo/pull/14742) |
| 299 | + [#14744](https://github.com/rust-lang/cargo/pull/14744) |
114 | 300 |
|
115 | 301 | ### Nightly only
|
116 | 302 |
|
|
0 commit comments