Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to 0.51.0, update changelog #8894

Merged
merged 2 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 66 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,86 @@
# Changelog

## Cargo 1.50 (2021-02-11)
[8662ab42...HEAD](https://github.com/rust-lang/cargo/compare/8662ab42...HEAD)

### Added
- Added the `doc` field to `cargo metadata`, which indicates if a target is
documented.
[#8869](https://github.com/rust-lang/cargo/pull/8869)

### Changed
- `.crate` files uploaded to a registry are now built with reproducible
settings, so that the same `.crate` file created on different machines
should be identical.
[#8864](https://github.com/rust-lang/cargo/pull/8864)

### Fixed

### Nightly only
- Allow `resolver="1"` to specify the original feature resolution behavior.
[#8857](https://github.com/rust-lang/cargo/pull/8857)
- Added `-Z extra-link-arg` which adds the `cargo:rustc-link-arg-bins`
and `cargo:rustc-link-arg` build script options.
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#extra-link-arg)
[#8441](https://github.com/rust-lang/cargo/pull/8441)

## Cargo 1.49 (2020-12-31)
[75615f8e...HEAD](https://github.com/rust-lang/cargo/compare/75615f8e...HEAD)
[75615f8e...rust-1.49.0](https://github.com/rust-lang/cargo/compare/75615f8e...rust-1.49.0)

### Added
- Added `homepage` and `documentation` fields to `cargo metadata`.
[#8744](https://github.com/rust-lang/cargo/pull/8744)
- Added the `CARGO_PRIMARY_PACKAGE` environment variable which is set when
running `rustc` if the package is one of the "root" packages selected on the
command line.
[#8758](https://github.com/rust-lang/cargo/pull/8758)
- Added support for Unix-style glob patterns for package and target selection
flags on the command-line (such as `-p 'serde*'` or `--test '*'`).
[#8752](https://github.com/rust-lang/cargo/pull/8752)

### Changed
- Computed LTO flags are now included in the filename metadata hash so that
changes in LTO settings will independently cache build artifacts instead of
overwriting previous ones. This prevents rebuilds in some situations such as
switching between `cargo build` and `cargo test` in some circumstances.
[#8755](https://github.com/rust-lang/cargo/pull/8755)
- `cargo tree` now displays `(proc-macro)` next to proc-macro packages.
[#8765](https://github.com/rust-lang/cargo/pull/8765)
- Added a warning that the allowed characters for a feature name have been
restricted to letters, digits, `_`, `-`, and `+` to accommodate future
syntax changes. This is still a superset of the allowed syntax on crates.io,
which requires ASCII. This is intended to be changed to an error in the
future.
[#8814](https://github.com/rust-lang/cargo/pull/8814)
- `-p` without a value will now print a list of workspace package names.
[#8808](https://github.com/rust-lang/cargo/pull/8808)

### Fixed
- Fixed building a library with both "dylib" and "rlib" crate types with LTO enabled.
[#8754](https://github.com/rust-lang/cargo/pull/8754)
- Fixed paths in Cargo's dep-info files.
[#8819](https://github.com/rust-lang/cargo/pull/8819)
- Fixed inconsistent source IDs in `cargo metadata` for git dependencies that
explicitly specify `branch="master"`.
[#8824](https://github.com/rust-lang/cargo/pull/8824)
- Fixed re-extracting dependencies which contained a `.cargo-ok` file.
[#8835](https://github.com/rust-lang/cargo/pull/8835)

### Nightly only

- Fixed a panic with `cargo doc -Zfeatures=itarget` in some situations.
[#8777](https://github.com/rust-lang/cargo/pull/8777)
- New implementation for namespaced features, using the syntax `dep:serde`.
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#namespaced-features)
[#8799](https://github.com/rust-lang/cargo/pull/8799)
- Added support for "weak" dependency features, using the syntax
`dep_name?/feat_name`, which will enable a feature for a dependency without
also enabling the dependency.
[#8818](https://github.com/rust-lang/cargo/pull/8818)
- Fixed the new feature resolver downloading extra dependencies that weren't
strictly necessary.
[#8823](https://github.com/rust-lang/cargo/pull/8823)
- Vendored builds now work with `-Zbuild-std`.
[#8834](https://github.com/rust-lang/cargo/pull/8834)

## Cargo 1.48 (2020-11-19)
[51b66125...rust-1.48.0](https://github.com/rust-lang/cargo/compare/51b66125...rust-1.48.0)
Expand Down Expand Up @@ -52,6 +113,9 @@
- Automatically reinitialize the index when an "Object not found" error is
encountered in the git repository.
[#8735](https://github.com/rust-lang/cargo/pull/8735)
- Updated libgit2, which brings in several fixes for git repository handling.
[#8778](https://github.com/rust-lang/cargo/pull/8778)
[#8780](https://github.com/rust-lang/cargo/pull/8780)

### Nightly only
- Fixed `cargo install` so that it will ignore the `[unstable]` table in local config files.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo"
version = "0.50.0"
version = "0.51.0"
edition = "2018"
authors = ["Yehuda Katz <wycats@gmail.com>",
"Carl Lerche <me@carllerche.com>",
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/dep_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ fn no_rewrite_if_no_change() {
#[cargo_test]
fn relative_depinfo_paths_ws() {
if !is_nightly() {
// See https://github.com/rust-lang/rust/issues/63012
// -Z binary-dep-depinfo is unstable (https://github.com/rust-lang/rust/issues/63012)
return;
}

Expand Down Expand Up @@ -368,7 +368,7 @@ fn relative_depinfo_paths_ws() {
#[cargo_test]
fn relative_depinfo_paths_no_ws() {
if !is_nightly() {
// See https://github.com/rust-lang/rust/issues/63012
// -Z binary-dep-depinfo is unstable (https://github.com/rust-lang/rust/issues/63012)
return;
}

Expand Down Expand Up @@ -535,7 +535,7 @@ fn reg_dep_source_not_tracked() {
#[cargo_test]
fn canonical_path() {
if !is_nightly() {
// See https://github.com/rust-lang/rust/issues/63012
// -Z binary-dep-depinfo is unstable (https://github.com/rust-lang/rust/issues/63012)
return;
}
if !cargo_test_support::symlink_supported() {
Expand Down
12 changes: 0 additions & 12 deletions tests/testsuite/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1352,10 +1352,6 @@ pub fn foo() {}

#[cargo_test]
fn doc_cap_lints() {
if !is_nightly() {
// This can be removed once intra_doc_link_resolution_failure fails on stable.
return;
}
let a = git::new("a", |p| {
p.file("Cargo.toml", &basic_lib_manifest("a"))
.file("src/lib.rs", BAD_INTRA_LINK_LIB)
Expand Down Expand Up @@ -1401,10 +1397,6 @@ fn doc_cap_lints() {

#[cargo_test]
fn doc_message_format() {
if !is_nightly() {
// This can be removed once intra_doc_link_resolution_failure fails on stable.
return;
}
let p = project().file("src/lib.rs", BAD_INTRA_LINK_LIB).build();

p.cargo("doc --message-format=json")
Expand All @@ -1431,10 +1423,6 @@ fn doc_message_format() {

#[cargo_test]
fn short_message_format() {
if !is_nightly() {
// This can be removed once intra_doc_link_resolution_failure fails on stable.
return;
}
let p = project().file("src/lib.rs", BAD_INTRA_LINK_LIB).build();
p.cargo("doc --message-format=short")
.with_status(101)
Expand Down
10 changes: 2 additions & 8 deletions tests/testsuite/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ fn thin_lto_works() {
#[cfg_attr(target_os = "macos", ignore)]
fn strip_works() {
if !is_nightly() {
// -Zstrip is unstable
return;
}

Expand Down Expand Up @@ -508,10 +509,6 @@ fn strip_works() {

#[cargo_test]
fn strip_requires_cargo_feature() {
if !is_nightly() {
return;
}

let p = project()
.file(
"Cargo.toml",
Expand Down Expand Up @@ -542,12 +539,9 @@ Caused by:
)
.run();
}

#[cargo_test]
fn strip_rejects_invalid_option() {
if !is_nightly() {
return;
}

let p = project()
.file(
"Cargo.toml",
Expand Down
2 changes: 2 additions & 0 deletions tests/testsuite/pub_priv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use cargo_test_support::{is_nightly, project};
#[cargo_test]
fn exported_priv_warning() {
if !is_nightly() {
// exported_private_dependencies lint is unstable
return;
}
Package::new("priv_dep", "0.1.0")
Expand Down Expand Up @@ -48,6 +49,7 @@ src/lib.rs:3:13: warning: type `[..]FromPriv` from private dependency 'priv_dep'
#[cargo_test]
fn exported_pub_dep() {
if !is_nightly() {
// exported_private_dependencies lint is unstable
return;
}
Package::new("pub_dep", "0.1.0")
Expand Down
3 changes: 3 additions & 0 deletions tests/testsuite/required_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ fn test_multiple_required_features() {
#[cargo_test]
fn bench_default_features() {
if !is_nightly() {
// #[bench] is unstable
return;
}

Expand Down Expand Up @@ -489,6 +490,7 @@ Consider enabling them by passing, e.g., `--features=\"a\"`
#[cargo_test]
fn bench_arg_features() {
if !is_nightly() {
// #[bench] is unstable
return;
}

Expand Down Expand Up @@ -536,6 +538,7 @@ fn bench_arg_features() {
#[cargo_test]
fn bench_multiple_required_features() {
if !is_nightly() {
// #[bench] is unstable
return;
}

Expand Down