From 560ee81ec187939ee265ad7f61848836dfe0bd1e Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 24 Feb 2022 13:47:20 -0800 Subject: [PATCH 1/2] Bump to 0.62.0 --- Cargo.toml | 2 +- .../core/compiler/build_context/target_info.rs | 12 ------------ src/cargo/core/compiler/mod.rs | 18 ++++-------------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fba5257a811..9110ab5aba6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo" -version = "0.61.0" +version = "0.62.0" edition = "2021" license = "MIT OR Apache-2.0" homepage = "https://crates.io" diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 6b40d48784f..6c5da38dde4 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -47,8 +47,6 @@ pub struct TargetInfo { pub rustdocflags: Vec, /// Whether or not rustc supports the `-Csplit-debuginfo` flag. pub supports_split_debuginfo: bool, - /// Whether or not rustc supports the `--json future-incompat` flag. - pub supports_json_future_incompat: bool, } /// Kind of each file generated by a Unit, part of `FileType`. @@ -181,15 +179,6 @@ impl TargetInfo { ) .is_ok(); - let supports_json_future_incompat = rustc - .cached_output( - process - .clone() - .args(&["--error-format", "json", "--json", "future-incompat"]), - extra_fingerprint, - ) - .is_ok(); - process.arg("--print=sysroot"); process.arg("--print=cfg"); @@ -264,7 +253,6 @@ impl TargetInfo { )?, cfg, supports_split_debuginfo, - supports_json_future_incompat, }) } diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index 750981c9528..4be5034e666 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -650,7 +650,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult { rustdoc.arg("--cfg").arg(&format!("feature=\"{}\"", feat)); } - add_error_format_and_color(cx, &mut rustdoc, unit); + add_error_format_and_color(cx, &mut rustdoc); add_allow_features(cx, &mut rustdoc); if let Some(args) = cx.bcx.extra_args_for(unit) { @@ -821,19 +821,9 @@ fn add_features(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder, unit: &Unit) { /// intercepting messages like rmeta artifacts, etc. rustc includes a /// "rendered" field in the JSON message with the message properly formatted, /// which Cargo will extract and display to the user. -fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder, unit: &Unit) { +fn add_error_format_and_color(cx: &Context<'_, '_>, cmd: &mut ProcessBuilder) { cmd.arg("--error-format=json"); - let mut json = String::from("--json=diagnostic-rendered-ansi,artifacts"); - if cx - .bcx - .target_data - .info(unit.kind) - .supports_json_future_incompat - { - // Emit a future-incompat report (when supported by rustc), so we can report - // future-incompat dependencies to the user - json.push_str(",future-incompat"); - } + let mut json = String::from("--json=diagnostic-rendered-ansi,artifacts,future-incompat"); match cx.bcx.build_config.message_format { MessageFormat::Short | MessageFormat::Json { short: true, .. } => { @@ -895,7 +885,7 @@ fn build_base_args( edition.cmd_edition_arg(cmd); add_path_args(bcx.ws, unit, cmd); - add_error_format_and_color(cx, cmd, unit); + add_error_format_and_color(cx, cmd); add_allow_features(cx, cmd); let mut contains_dy_lib = false; From 019218fe58d6604d8a77d3dc751adc471d4337ba Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 24 Feb 2022 14:18:15 -0800 Subject: [PATCH 2/2] Update changelog for 1.60 --- CHANGELOG.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05f2d186f30..0f4e8165c41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,30 @@ # Changelog +## Cargo 1.61 (2022-04-07) +[ea2a21c9...HEAD](https://github.com/rust-lang/cargo/compare/ea2a21c9...HEAD) + +### Added + +### Changed + +- `cargo test --no-run` will now display the path to the test executables. + [#10346](https://github.com/rust-lang/cargo/pull/10346) + +### Fixed + +### Nightly only + +- Added `-Z check-cfg-features` to enable compile-time checking of features + [#10408](https://github.com/rust-lang/cargo/pull/10408) +- Added `-Z bindeps` to support binary artifact dependencies (RFC-3028) + [#9992](https://github.com/rust-lang/cargo/pull/9992) + + ## Cargo 1.60 (2022-04-07) -[358e79fe...HEAD](https://github.com/rust-lang/cargo/compare/358e79fe...HEAD) +[358e79fe...rust-1.60.0](https://github.com/rust-lang/cargo/compare/358e79fe...rust-1.60.0) ### Added + - 🎉 Added the `dep:` prefix in the `[features]` table to refer to an optional dependency. This allows creating feature names with the same name as a dependency, and allows for "hiding" optional dependencies so that they do @@ -15,24 +36,66 @@ is already enabled by some other feature. [docs](https://doc.rust-lang.org/nightly/cargo/reference/features.html#dependency-features) [#10269](https://github.com/rust-lang/cargo/pull/10269) +- 🎉 Added `--timings` option to generate an HTML report about build timing, + concurrency, and CPU use. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/timings.html) + [#10245](https://github.com/rust-lang/cargo/pull/10245) - Added the `"v"` and `"features2"` fields to the registry index. The `"v"` field provides a method for compatibility with future changes to the index. [docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format) [#10269](https://github.com/rust-lang/cargo/pull/10269) +- Added bash completion for `cargo clippy` + [#10347](https://github.com/rust-lang/cargo/pull/10347) +- Added bash completion for `cargo report` + [#10295](https://github.com/rust-lang/cargo/pull/10295) +- Added support to build scripts for `rustc-link-arg-tests`, + `rustc-link-arg-examples`, and `rustc-link-arg-benches`. + [docs](https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#outputs-of-the-build-script) + [#10274](https://github.com/rust-lang/cargo/pull/10274) ### Changed + - Cargo now uses the clap 3 library for command-line argument parsing. [#10265](https://github.com/rust-lang/cargo/pull/10265) - The `build.pipelining` config option is now deprecated, pipelining will now always be enabled. [#10258](https://github.com/rust-lang/cargo/pull/10258) +- `cargo new` will now generate a `.gitignore` which only ignores `Cargo.lock` + in the root of the repo, instead of any directory. + [#10379](https://github.com/rust-lang/cargo/pull/10379) +- Improved startup time of bash completion. + [#10365](https://github.com/rust-lang/cargo/pull/10365) +- The `--features` flag is now honored when used with the `--all-features` + flag, which allows enabling features from other packages. + [#10337](https://github.com/rust-lang/cargo/pull/10337) +- Cargo now uses a different TOML parser. This should not introduce any + user-visible changes. This paves the way to support format-preserving + programmatic modification of TOML files for supporting `cargo add` and other + future enhancements. + [#10086](https://github.com/rust-lang/cargo/pull/10086) +- Setting a library to emit both a `dylib` and `cdylib` is now an error, as + this combination is not supported. + [#10243](https://github.com/rust-lang/cargo/pull/10243) +- `cargo --list` now includes the `help` command. + [#10300](https://github.com/rust-lang/cargo/pull/10300) ### Fixed +- Fixed running `cargo doc` on examples with dev-dependencies. + [#10341](https://github.com/rust-lang/cargo/pull/10341) +- Fixed `cargo install --path` for a path that is relative to a directory + outside of the workspace in the current directory. + [#10335](https://github.com/rust-lang/cargo/pull/10335) +- `cargo test TEST_FILTER` should no longer build binaries that are explicitly + disabled with `test = false`. + [#10305](https://github.com/rust-lang/cargo/pull/10305) + ### Nightly only + - Added `rustflags` option to a profile definition. [#10217](https://github.com/rust-lang/cargo/pull/10217) - +- Changed `--config` to only support dotted keys. + [#10176](https://github.com/rust-lang/cargo/pull/10176) ## Cargo 1.59 (2022-02-24) [7f08ace4...rust-1.59.0](https://github.com/rust-lang/cargo/compare/7f08ace4...rust-1.59.0) @@ -43,6 +106,7 @@ behavior for removing symbols and debug information from binaries. [docs](https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#strip) [#10088](https://github.com/rust-lang/cargo/pull/10088) + [#10376](https://github.com/rust-lang/cargo/pull/10376) - 🎉 Added future incompatible reporting. This provides reporting for when a future change in `rustc` may cause a package or any of its dependencies to stop building. @@ -69,6 +133,7 @@ [#10193](https://github.com/rust-lang/cargo/pull/10193) - Removed the deprecated `--host` CLI option. [#10145](https://github.com/rust-lang/cargo/pull/10145) + [#10327](https://github.com/rust-lang/cargo/pull/10327) - Cargo should now report its version to always be in sync with `rustc`. [#10178](https://github.com/rust-lang/cargo/pull/10178) - Added EOPNOTSUPP to ignored file locking errors, which is relevant to BSD @@ -83,6 +148,7 @@ - Fixed so that the `doc=false` setting is honored in the `[lib]` definition of a dependency. [#10201](https://github.com/rust-lang/cargo/pull/10201) + [#10324](https://github.com/rust-lang/cargo/pull/10324) - The `"executable"` field in the JSON option was incorrectly including the path to `index.html` when documenting a binary. It is now null. [#10171](https://github.com/rust-lang/cargo/pull/10171)