diff --git a/CHANGELOG.md b/CHANGELOG.md index cd2e3e7d962..5e71cce0b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,178 @@ # Changelog ## Cargo 1.80 (2024-07-25) -[b60a1555...HEAD](https://github.com/rust-lang/cargo/compare/b60a1555...HEAD) +[b60a1555...rust-1.80.0](https://github.com/rust-lang/cargo/compare/b60a1555...rust-1.80.0) ### Added +- 🎉 Stabilize `-Zcheck-cfg`! This by default enables rustc's checking of + conditional compilation at compile time, which verifies that the crate is + correctly handling conditional compilation for different target platforms or + features. Internally, cargo will be passing a new command line option + `--check-cfg` to all rustc and rustdoc invocations. + + A new build script invocation + [`cargo::rustc-check-cfg=CHECK_CFG`](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg) + is added along with this stabilization, as a way to add custom cfgs to the + list of expected cfg names and values. + + If a build script is not an option for your package, Cargo provides a config + [`[lints.rust.unexpected_cfgs.check-cfg]`](https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#check-cfg-in-lintsrust-table) + to add known custom cfgs statically. + + ([RFC 3013](https://github.com/rust-lang/rfcs/blob/master/text/3013-conditional-compilation-checking.md)) + ([docs](https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html)) + [#13571](https://github.com/rust-lang/cargo/pull/13571) + [#13865](https://github.com/rust-lang/cargo/pull/13865) + [#13869](https://github.com/rust-lang/cargo/pull/13869) + [#13884](https://github.com/rust-lang/cargo/pull/13884) + [#13913](https://github.com/rust-lang/cargo/pull/13913) + [#13937](https://github.com/rust-lang/cargo/pull/13937) + [#13958](https://github.com/rust-lang/cargo/pull/13958) + +- 🎉 cargo-update: Allows `--precise` to specify a yanked version of a package, + and will update the lockfile accordingly. + [#13974](https://github.com/rust-lang/cargo/pull/13974) + ### Changed +- ❗️ manifest: Disallow `[badges]` to inherit from `[workspace.package.badges]`. + This was considered a bug and should inherit from `[workspace.badges]`. + Keep in mind that `[badges]` is effectively deprecated. + [#13788](https://github.com/rust-lang/cargo/pull/13788) +- build-script: Suggest old syntax based on MSRV. + [#13874](https://github.com/rust-lang/cargo/pull/13874) +- cargo-add: Avoid escaping double quotes by using string literals. + [#14006](https://github.com/rust-lang/cargo/pull/14006) +- cargo-clean: Performance improvements for cleaning specific packages via `-p` flag. + [#13818](https://github.com/rust-lang/cargo/pull/13818) +- cargo-new: Use `i32` rather than `usize` as the "default integer" in library template. + [#13939](https://github.com/rust-lang/cargo/pull/13939) +- cargo-package: Warn, rather than fail, if a Cargo target is excluded during packaging. + [#13713](https://github.com/rust-lang/cargo/pull/13713) +- manifest: Warn, not error, on unsupported lint tool in the `[lints]` table. + [#13833](https://github.com/rust-lang/cargo/pull/13833) +- perf: Avoid inferring when Cargo targets are known. + [#13849](https://github.com/rust-lang/cargo/pull/13849) +- Populate git information when building Cargo from Rust's source tarball. + [#13832](https://github.com/rust-lang/cargo/pull/13832) +- Improve the error message when deserializing Cargo configuration from partial environment variables. + [#13956](https://github.com/rust-lang/cargo/pull/13956) + ### Fixed +- resolver: Make path dependencies with the same name stay locked. + [#13572](https://github.com/rust-lang/cargo/pull/13572) +- cargo-add: Preserve file permissions on Unix during `write_atomic`. + [#13898](https://github.com/rust-lang/cargo/pull/13898) +- cargo-clean: Remove symlink directory on Windows. + [#13910](https://github.com/rust-lang/cargo/pull/13910) +- cargo-fix: Don't fix into the standard library. + [#13792](https://github.com/rust-lang/cargo/pull/13792) +- cargo-fix: Support IPv6-only networks. + [#13907](https://github.com/rust-lang/cargo/pull/13907) +- cargo-new: Don't say we're adding to a workspace when a regular package is in the root. + [#13987](https://github.com/rust-lang/cargo/pull/13987) +- cargo-vendor: Silence the warning about forgetting the vendoring. + [#13886](https://github.com/rust-lang/cargo/pull/13886) +- cargo-publish/cargo-vendor: Ensure targets in generated Cargo.toml are in a deterministic order. + [#13989](https://github.com/rust-lang/cargo/pull/13989) + [#14004](https://github.com/rust-lang/cargo/pull/14004) +- cargo-credential-libsecret: Load `libsecret` by its `SONAME`, `libsecret-1.so.0`. + [#13927](https://github.com/rust-lang/cargo/pull/13927) +- Don't panic when an alias doesn't include a subcommand. + [#13819](https://github.com/rust-lang/cargo/pull/13819) +- Workaround copying file returning EAGAIN on ZFS on macOS. + [#13845](https://github.com/rust-lang/cargo/pull/13845) +- Fetch specific commits even if the GitHub fast path fails. + [#13946](https://github.com/rust-lang/cargo/pull/13946) + [#13969](https://github.com/rust-lang/cargo/pull/13969) +- Distinguish Cargo config from different environment variables that share the same prefix. + [#14000](https://github.com/rust-lang/cargo/pull/14000) + ### Nightly only - `-Zcargo-lints`: Don't always inherit workspace lints. [#13812](https://github.com/rust-lang/cargo/pull/13812) +- `-Zcargo-lints`: Add a test to ensure cap-lints works. + [#13829](https://github.com/rust-lang/cargo/pull/13829) +- `-Zcargo-lints`: Error when unstable lints are specified but not enabled. + [#13805](https://github.com/rust-lang/cargo/pull/13805) +- `-Zcargo-lints`: Add cargo-lints to unstable docs. + [#13881](https://github.com/rust-lang/cargo/pull/13881) +- `-Zcargo-lints`: Refactor cargo lint tests. + [#13880](https://github.com/rust-lang/cargo/pull/13880) +- `-Zcargo-lints`: Remove ability to specify `-` in lint name. + [#13837](https://github.com/rust-lang/cargo/pull/13837) +- `-Zscript`: Remove unstable rejected frontmatter syntax for cargo script. + The only allowed frontmatter syntax now is `---`. + [#13861](https://github.com/rust-lang/cargo/pull/13861) + [#13893](https://github.com/rust-lang/cargo/pull/13893) +- `-Zbindeps`: Build only the specified artifact library when multiple types are available. + [#13842](https://github.com/rust-lang/cargo/pull/13842) +- `-Zmsrv-policy`: Treat unset MSRV as compatible. + [#13791](https://github.com/rust-lang/cargo/pull/13791) +- `-Zgit`/`-Zgitoxide`: Default configuration to be obtained from both environment variables and Cargo configuration. + [#13687](https://github.com/rust-lang/cargo/pull/13687) +- `-Zpublic-dependency`: Don't lose 'public' when inheriting a dependency. + [#13836](https://github.com/rust-lang/cargo/pull/13836) +- `edition2024`: Disallow ignored `default-features` when inheriting. + [#13839](https://github.com/rust-lang/cargo/pull/13839) +- `edition2024`: Validate crate-types/proc-macro for bin like other Cargo targets. + [#13841](https://github.com/rust-lang/cargo/pull/13841) ### Documentation +- cargo-package: Clarify no guarantee of VCS provenance. + [#13984](https://github.com/rust-lang/cargo/pull/13984) +- cargo-metadata: Clarify dash replacement rule in Cargo target names. + [#13887](https://github.com/rust-lang/cargo/pull/13887) +- config: Fix wrong type of `rustc-flags` in build script overrides. + [#13957](https://github.com/rust-lang/cargo/pull/13957) +- resolver: Add README for `resolver-tests`. + [#13977](https://github.com/rust-lang/cargo/pull/13977) +- contrib: Update UI example code in contributor guide. + [#13864](https://github.com/rust-lang/cargo/pull/13864) +- Fix libcurl proxy documentation link. + [#13990](https://github.com/rust-lang/cargo/pull/13990) +- Add missing `CARGO_MAKEFLAGS` env for plugins. + [#13872](https://github.com/rust-lang/cargo/pull/13872) +- Include CircleCI reference in the Continuous Integration chapter. + [#13850](https://github.com/rust-lang/cargo/pull/13850) + ### Internal +- ci: Don't check `cargo` against beta channel. + [#13827](https://github.com/rust-lang/cargo/pull/13827) +- test: Set safe.directory for git repo in apache container. + [#13920](https://github.com/rust-lang/cargo/pull/13920) +- test: Silence warnings running embedded unittests. + [#13929](https://github.com/rust-lang/cargo/pull/13929) +- test: Update test formatting due to nightly rustc changes. + [#13890](https://github.com/rust-lang/cargo/pull/13890) + [#13901](https://github.com/rust-lang/cargo/pull/13901) + [#13964](https://github.com/rust-lang/cargo/pull/13964) +- test: Make `git::use_the_cli` test truly locale independent. + [#13935](https://github.com/rust-lang/cargo/pull/13935) +- cargo-test-support: Transition direct assertions from cargo-test-support to snapbox. + [#13980](https://github.com/rust-lang/cargo/pull/13980) +- cargo-test-support: Auto-redact elapsed time. + [#13973](https://github.com/rust-lang/cargo/pull/13973) +- cargo-test-support: Clean up unnecessary uses of `match_exact`. + [#13879](https://github.com/rust-lang/cargo/pull/13879) +- Split `RecursivePathSource` out of `PathSource`. + [#13993](https://github.com/rust-lang/cargo/pull/13993) +- Adjust custom errors from cert-check due to libgit2 1.8 change. + [#13970](https://github.com/rust-lang/cargo/pull/13970) +- Move diagnostic printing to Shell. + [#13813](https://github.com/rust-lang/cargo/pull/13813) +- Update dependencies. + [#13834](https://github.com/rust-lang/cargo/pull/13834) + [#13840](https://github.com/rust-lang/cargo/pull/13840) + [#13948](https://github.com/rust-lang/cargo/pull/13948) + [#13963](https://github.com/rust-lang/cargo/pull/13963) + [#13976](https://github.com/rust-lang/cargo/pull/13976) + ## Cargo 1.79 (2024-06-13) [2fe739fc...rust-1.79.0](https://github.com/rust-lang/cargo/compare/2fe739fc...rust-1.79.0)