Skip to content

Commit 8475310

Browse files
committed
Auto merge of #8508 - ehuss:version-bump, r=alexcrichton
Bump to 0.48.0, update changelog
2 parents 632b1bb + 3b661a9 commit 8475310

File tree

6 files changed

+108
-86
lines changed

6 files changed

+108
-86
lines changed

CHANGELOG.md

Lines changed: 105 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,95 @@
11
# Changelog
22

3+
## Cargo 1.47 (2020-10-08)
4+
[4f74d9b2...HEAD](https://github.com/rust-lang/cargo/compare/4f74d9b2...HEAD)
5+
6+
### Added
7+
8+
### Changed
9+
- The comments added to `.gitignore` when it is modified have been tweaked to
10+
add some spacing.
11+
[#8476](https://github.com/rust-lang/cargo/pull/8476)
12+
- `cargo metadata` output should now be sorted to be deterministic.
13+
[#8489](https://github.com/rust-lang/cargo/pull/8489)
14+
- By default, build scripts and proc-macros are now built with `opt-level=0`
15+
and the default codegen units, even in release mode.
16+
[#8500](https://github.com/rust-lang/cargo/pull/8500)
17+
18+
### Fixed
19+
- Fixed issue where if a project directory was moved, and one of the
20+
build scripts did not use the `rerun-if-changed` directive, then that
21+
build script was being rebuilt when it shouldn't.
22+
[#8497](https://github.com/rust-lang/cargo/pull/8497)
23+
24+
### Nightly only
25+
- Added support for `-Z terminal-width` which tells `rustc` the width of the
26+
terminal so that it can format diagnostics better.
27+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#terminal-width)
28+
[#8427](https://github.com/rust-lang/cargo/pull/8427)
29+
- Added ability to configure `-Z` unstable flags in config files via the
30+
`[unstable]` table.
31+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html)
32+
[#8393](https://github.com/rust-lang/cargo/pull/8393)
33+
- Added [`-Z build-std-features`] flag to set features for the standard library.
34+
[#8490](https://github.com/rust-lang/cargo/pull/8490)
35+
336
## Cargo 1.46 (2020-08-27)
4-
[9fcb8c1d...HEAD](https://github.com/rust-lang/cargo/compare/9fcb8c1d...HEAD)
37+
[9fcb8c1d...rust-1.46.0](https://github.com/rust-lang/cargo/compare/9fcb8c1d...rust-1.46.0)
538

639
### Added
40+
- The `dl` key in `config.json` of a registry index now supports the
41+
replacement markers `{prefix}` and `{lowerprefix}` to allow spreading crates
42+
across directories similar to how the index itself is structured.
43+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#index-format)
44+
[#8267](https://github.com/rust-lang/cargo/pull/8267)
45+
- Added new environment variables that are set during compilation:
46+
- `CARGO_CRATE_NAME`: The name of the crate being built.
47+
- `CARGO_BIN_NAME`: The name of the executable binary (if this is a binary crate).
48+
- `CARGO_PKG_LICENSE`: The `license` field from the manifest.
49+
- `CARGO_PKG_LICENSE_FILE`: The `license-file` field from the manifest.
50+
[#8270](https://github.com/rust-lang/cargo/pull/8270)
51+
[#8325](https://github.com/rust-lang/cargo/pull/8325)
52+
[#8387](https://github.com/rust-lang/cargo/pull/8387)
53+
- If the value for `readme` is not specified in `Cargo.toml`, it is now
54+
automatically inferred from the existence of a file named `README`,
55+
`README.md`, or `README.txt`. This can be suppressed by setting
56+
`readme = false`.
57+
[#8277](https://github.com/rust-lang/cargo/pull/8277)
58+
- `cargo install` now supports the `--index` flag to install directly from an index.
59+
[#8344](https://github.com/rust-lang/cargo/pull/8344)
60+
- Added the `metadata` table to the `workspace` definition in `Cargo.toml`.
61+
This can be used for arbitrary data similar to the `package.metadata` table.
62+
[#8323](https://github.com/rust-lang/cargo/pull/8323)
63+
- Added the `--target-dir` flag to `cargo install` to set the target directory.
64+
[#8391](https://github.com/rust-lang/cargo/pull/8391)
65+
- Changes to environment variables used by the
66+
[`env!`](https://doc.rust-lang.org/std/macro.env.html) or
67+
[`option_env!`](https://doc.rust-lang.org/std/macro.option_env.html) macros
68+
are now automatically detected to trigger a rebuild.
69+
[#8421](https://github.com/rust-lang/cargo/pull/8421)
70+
- The `target` directory now includes the `CACHEDIR.TAG` file which is used by
71+
some tools to exclude the directory from backups.
72+
[#8378](https://github.com/rust-lang/cargo/pull/8378)
73+
- Added docs about rustup's `+toolchain` syntax.
74+
[#8455](https://github.com/rust-lang/cargo/pull/8455)
775

876
### Changed
977
- A warning is now displayed if a git dependency includes a `#` fragment in
1078
the URL. This was potentially confusing because Cargo itself displays git
1179
URLs with this syntax, but it does not have any meaning outside of the
1280
`Cargo.lock` file, and would not work properly.
1381
[#8297](https://github.com/rust-lang/cargo/pull/8297)
82+
- Various optimizations and fixes for bitcode embedding and LTO.
83+
[#8349](https://github.com/rust-lang/cargo/pull/8349)
84+
- Reduced the amount of data fetched for git dependencies. If Cargo knows the
85+
branch or tag to fetch, it will now only fetch that branch or tag instead of
86+
all branches and tags.
87+
[#8363](https://github.com/rust-lang/cargo/pull/8363)
88+
- Enhanced git fetch error messages.
89+
[#8409](https://github.com/rust-lang/cargo/pull/8409)
90+
- `.crate` files are now generated with GNU tar format instead of UStar, which
91+
supports longer file names.
92+
[#8453](https://github.com/rust-lang/cargo/pull/8453)
1493

1594
### Fixed
1695
- Fixed a rare situation where an update to `Cargo.lock` failed once, but then
@@ -22,6 +101,27 @@
22101
- Updated libgit2, which brings in a fix for zlib errors for some remote
23102
git servers like googlesource.com.
24103
[#8320](https://github.com/rust-lang/cargo/pull/8320)
104+
- Fixed the GitHub fast-path check for up-to-date git dependencies on
105+
non-master branches.
106+
[#8363](https://github.com/rust-lang/cargo/pull/8363)
107+
- Fixed issue when enabling a feature with `pkg/feature` syntax, and `pkg` is
108+
an optional dependency, but also a dev-dependency, and the dev-dependency
109+
appears before the optional normal dependency in the registry summary, then
110+
the optional dependency would not get activated.
111+
[#8395](https://github.com/rust-lang/cargo/pull/8395)
112+
- Fixed `clean -p` deleting the build directory if there is a test named
113+
`build`.
114+
[#8398](https://github.com/rust-lang/cargo/pull/8398)
115+
- Fixed indentation of multi-line Cargo error messages.
116+
[#8409](https://github.com/rust-lang/cargo/pull/8409)
117+
- Fixed issue where the automatic inclusion of the `--document-private-items`
118+
flag for rustdoc would override any flags passed to the `cargo rustdoc`
119+
command.
120+
[#8449](https://github.com/rust-lang/cargo/pull/8449)
121+
- Cargo will now include a version in the hash of the fingerprint directories
122+
to support backwards-incompatible changes to the fingerprint structure.
123+
[#8473](https://github.com/rust-lang/cargo/pull/8473)
124+
[#8488](https://github.com/rust-lang/cargo/pull/8488)
25125

26126
### Nightly only
27127
- Added `-Zrustdoc-map` feature which provides external mappings for rustdoc
@@ -31,7 +131,10 @@
31131
- Fixed feature calculation when a proc-macro is declared in `Cargo.toml` with
32132
an underscore (like `proc_macro = true`).
33133
[#8319](https://github.com/rust-lang/cargo/pull/8319)
34-
134+
- Added support for setting `-Clinker` with `-Zdoctest-xcompile`.
135+
[#8359](https://github.com/rust-lang/cargo/pull/8359)
136+
- Fixed setting the `strip` profile field in config files.
137+
[#8454](https://github.com/rust-lang/cargo/pull/8454)
35138

36139
## Cargo 1.45 (2020-07-16)
37140
[ebda5065e...rust-1.45.0](https://github.com/rust-lang/cargo/compare/ebda5065...rust-1.45.0)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo"
3-
version = "0.47.0"
3+
version = "0.48.0"
44
edition = "2018"
55
authors = ["Yehuda Katz <wycats@gmail.com>",
66
"Carl Lerche <me@carllerche.com>",

src/cargo/core/compiler/build_context/target_info.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ pub struct TargetInfo {
4040
pub rustflags: Vec<String>,
4141
/// Extra flags to pass to `rustdoc`, see `env_args`.
4242
pub rustdocflags: Vec<String>,
43-
/// Remove this when it hits stable (1.45)
44-
pub supports_embed_bitcode: Option<bool>,
4543
}
4644

4745
/// Kind of each file generated by a Unit, part of `FileType`.
@@ -143,13 +141,6 @@ impl TargetInfo {
143141
.args(&rustflags)
144142
.env_remove("RUSTC_LOG");
145143

146-
let mut embed_bitcode_test = process.clone();
147-
embed_bitcode_test.arg("-Cembed-bitcode");
148-
let supports_embed_bitcode = match kind {
149-
CompileKind::Host => Some(rustc.cached_output(&embed_bitcode_test).is_ok()),
150-
_ => None,
151-
};
152-
153144
if let CompileKind::Target(target) = kind {
154145
process.arg("--target").arg(target.rustc_target());
155146
}
@@ -240,7 +231,6 @@ impl TargetInfo {
240231
"RUSTDOCFLAGS",
241232
)?,
242233
cfg,
243-
supports_embed_bitcode,
244234
})
245235
}
246236

src/cargo/core/compiler/mod.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -817,31 +817,10 @@ fn build_base_args(
817817
}
818818
lto::Lto::ObjectAndBitcode => {} // this is rustc's default
819819
lto::Lto::OnlyBitcode => {
820-
// Note that this compiler flag, like the one below, is just an
821-
// optimization in terms of build time. If we don't pass it then
822-
// both object code and bitcode will show up. This is lagely just
823-
// compat until the feature lands on stable and we can remove the
824-
// conditional branch.
825-
if cx
826-
.bcx
827-
.target_data
828-
.info(CompileKind::Host)
829-
.supports_embed_bitcode
830-
.unwrap()
831-
{
832-
cmd.arg("-Clinker-plugin-lto");
833-
}
820+
cmd.arg("-Clinker-plugin-lto");
834821
}
835822
lto::Lto::OnlyObject => {
836-
if cx
837-
.bcx
838-
.target_data
839-
.info(CompileKind::Host)
840-
.supports_embed_bitcode
841-
.unwrap()
842-
{
843-
cmd.arg("-Cembed-bitcode=no");
844-
}
823+
cmd.arg("-Cembed-bitcode=no");
845824
}
846825
}
847826

tests/testsuite/lto.rs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ use std::process::Output;
55

66
#[cargo_test]
77
fn with_deps() {
8-
if !cargo_test_support::is_nightly() {
9-
return;
10-
}
11-
128
Package::new("bar", "0.0.1").publish();
139

1410
let p = project()
@@ -36,10 +32,6 @@ fn with_deps() {
3632

3733
#[cargo_test]
3834
fn shared_deps() {
39-
if !cargo_test_support::is_nightly() {
40-
return;
41-
}
42-
4335
Package::new("bar", "0.0.1").publish();
4436

4537
let p = project()
@@ -70,10 +62,6 @@ fn shared_deps() {
7062

7163
#[cargo_test]
7264
fn build_dep_not_ltod() {
73-
if !cargo_test_support::is_nightly() {
74-
return;
75-
}
76-
7765
Package::new("bar", "0.0.1").publish();
7866

7967
let p = project()
@@ -102,10 +90,6 @@ fn build_dep_not_ltod() {
10290

10391
#[cargo_test]
10492
fn complicated() {
105-
if !cargo_test_support::is_nightly() {
106-
return;
107-
}
108-
10993
Package::new("dep-shared", "0.0.1")
11094
.file("src/lib.rs", "pub fn foo() {}")
11195
.publish();
@@ -233,10 +217,6 @@ fn complicated() {
233217

234218
#[cargo_test]
235219
fn off_in_manifest_works() {
236-
if !cargo_test_support::is_nightly() {
237-
return;
238-
}
239-
240220
Package::new("bar", "0.0.1")
241221
.file("src/lib.rs", "pub fn foo() {}")
242222
.publish();
@@ -284,10 +264,6 @@ fn off_in_manifest_works() {
284264

285265
#[cargo_test]
286266
fn between_builds() {
287-
if !cargo_test_support::is_nightly() {
288-
return;
289-
}
290-
291267
let p = project()
292268
.file(
293269
"Cargo.toml",
@@ -325,10 +301,6 @@ fn between_builds() {
325301

326302
#[cargo_test]
327303
fn test_all() {
328-
if !cargo_test_support::is_nightly() {
329-
return;
330-
}
331-
332304
let p = project()
333305
.file(
334306
"Cargo.toml",
@@ -352,10 +324,6 @@ fn test_all() {
352324

353325
#[cargo_test]
354326
fn test_all_and_bench() {
355-
if !cargo_test_support::is_nightly() {
356-
return;
357-
}
358-
359327
let p = project()
360328
.file(
361329
"Cargo.toml",
@@ -495,9 +463,6 @@ fn verify_lto(output: &Output, krate: &str, krate_info: &str, expected_lto: Lto)
495463

496464
#[cargo_test]
497465
fn cdylib_and_rlib() {
498-
if !cargo_test_support::is_nightly() {
499-
return;
500-
}
501466
let p = project_with_dep("'cdylib', 'rlib'");
502467
let output = p.cargo("build --release -v").exec_with_output().unwrap();
503468
verify_lto(
@@ -564,9 +529,6 @@ fn cdylib_and_rlib() {
564529

565530
#[cargo_test]
566531
fn dylib() {
567-
if !cargo_test_support::is_nightly() {
568-
return;
569-
}
570532
let p = project_with_dep("'dylib'");
571533
let output = p.cargo("build --release -v").exec_with_output().unwrap();
572534
verify_lto(&output, "registry", "--crate-type lib", Lto::OnlyObject);
@@ -623,9 +585,6 @@ fn dylib() {
623585

624586
#[cargo_test]
625587
fn test_profile() {
626-
if !cargo_test_support::is_nightly() {
627-
return;
628-
}
629588
Package::new("bar", "0.0.1")
630589
.file("src/lib.rs", "pub fn foo() -> i32 { 123 } ")
631590
.publish();
@@ -677,9 +636,6 @@ fn test_profile() {
677636

678637
#[cargo_test]
679638
fn dev_profile() {
680-
if !cargo_test_support::is_nightly() {
681-
return;
682-
}
683639
// Mixing dev=LTO with test=not-LTO
684640
Package::new("bar", "0.0.1")
685641
.file("src/lib.rs", "pub fn foo() -> i32 { 123 } ")

tests/testsuite/rustc_info_cache.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ use std::env;
66

77
#[cargo_test]
88
fn rustc_info_cache() {
9-
// Needs `-Cbitcode-in-rlib` to ride to stable before this can be enabled
10-
// everywhere.
11-
if !cargo_test_support::is_nightly() {
12-
return;
13-
}
14-
159
let p = project()
1610
.file("src/main.rs", r#"fn main() { println!("hello"); }"#)
1711
.build();

0 commit comments

Comments
 (0)