Skip to content

Commit 624ce68

Browse files
committed
Merge branch 'master' into trywithout
2 parents ad065e7 + 258c896 commit 624ce68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1452
-657
lines changed

CHANGELOG.md

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,64 @@
11
# Changelog
22

3+
## Cargo 1.45 (2020-07-16)
4+
[ebda5065e...HEAD](https://github.com/rust-lang/cargo/compare/ebda5065e...HEAD)
5+
6+
### Added
7+
8+
### Changed
9+
- Changed official documentation to recommend `.cargo/config.toml` filenames
10+
(with the `.toml` extension). `.toml` extension support was added in 1.39.
11+
[#8121](https://github.com/rust-lang/cargo/pull/8121)
12+
- The `registry.index` config value is no longer allowed (it has been
13+
deprecated for 4 years).
14+
[#7973](https://github.com/rust-lang/cargo/pull/7973)
15+
- An error is generated if both `--index` and `--registry` are passed
16+
(previously `--index` was silently ignored).
17+
[#7973](https://github.com/rust-lang/cargo/pull/7973)
18+
- The `registry.token` config value is no longer used with the `--index` flag.
19+
This is intended to avoid potentially leaking the crates.io token to another
20+
registry.
21+
[#7973](https://github.com/rust-lang/cargo/pull/7973)
22+
- Added a warning if `registry.token` is used with source replacement. It is
23+
intended this will be an error in future versions.
24+
[#7973](https://github.com/rust-lang/cargo/pull/7973)
25+
- Windows GNU targets now copy `.dll.a` import library files for DLL crate
26+
types to the output directory.
27+
[#8141](https://github.com/rust-lang/cargo/pull/8141)
28+
- Dylibs for all dependencies are now unconditionally copied to the output
29+
directory. Some obscure scenarios can cause an old dylib to be referenced
30+
between builds, and this ensures that all the latest copies are used.
31+
[#8139](https://github.com/rust-lang/cargo/pull/8139)
32+
33+
### Fixed
34+
- Fixed copying Windows `.pdb` files to the output directory when the filename
35+
contained dashes.
36+
[#8123](https://github.com/rust-lang/cargo/pull/8123)
37+
38+
### Nightly only
39+
- Fixed passing the full path for `--target` to `rustdoc` when using JSON spec
40+
targets.
41+
[#8094](https://github.com/rust-lang/cargo/pull/8094)
42+
- `-Cembed-bitcode=no` renamed to `-Cbitcode-in-rlib=no`
43+
[#8134](https://github.com/rust-lang/cargo/pull/8134)
44+
- Added new `resolver` field to `Cargo.toml` to opt-in to the new feature
45+
resolver.
46+
[#8129](https://github.com/rust-lang/cargo/pull/8129)
47+
348
## Cargo 1.44 (2020-06-04)
4-
[bda50510...HEAD](https://github.com/rust-lang/cargo/compare/bda50510...HEAD)
49+
[bda50510...ebda5065e](https://github.com/rust-lang/cargo/compare/bda50510...ebda5065e)
550

651
### Added
52+
- 🔥 Added the `cargo tree` command.
53+
[docs](https://doc.rust-lang.org/nightly/cargo/commands/cargo-tree.html)
54+
[#8062](https://github.com/rust-lang/cargo/pull/8062)
755
- Added warnings if a package has Windows-restricted filenames (like `nul`,
856
`con`, `aux`, `prn`, etc.).
957
[#7959](https://github.com/rust-lang/cargo/pull/7959)
58+
- Added a `"build-finished"` JSON message when compilation is complete so that
59+
tools can detect when they can stop listening for JSON messages with
60+
commands like `cargo run` or `cargo test`.
61+
[#8069](https://github.com/rust-lang/cargo/pull/8069)
1062

1163
### Changed
1264
- Valid package names are now restricted to Unicode XID identifiers. This is
@@ -19,22 +71,79 @@
1971
[#7959](https://github.com/rust-lang/cargo/pull/7959)
2072
- Tests are no longer hard-linked into the output directory (`target/debug/`).
2173
This ensures tools will have access to debug symbols and execute tests in
22-
the same was as Cargo. Tools should use JSON messages to discover the path
74+
the same way as Cargo. Tools should use JSON messages to discover the path
2375
to the executable.
2476
[#7965](https://github.com/rust-lang/cargo/pull/7965)
2577
- Updating git submodules now displays an "Updating" message for each
2678
submodule.
2779
[#7989](https://github.com/rust-lang/cargo/pull/7989)
80+
- File modification times are now preserved when extracting a `.crate` file.
81+
This reverses the change made in 1.40 where the mtime was not preserved.
82+
[#7935](https://github.com/rust-lang/cargo/pull/7935)
83+
- Build script warnings are now displayed separately when the build script
84+
fails.
85+
[#8017](https://github.com/rust-lang/cargo/pull/8017)
86+
- Removed the `git-checkout` subcommand.
87+
[#8040](https://github.com/rust-lang/cargo/pull/8040)
88+
- The progress bar is now enabled for all unix platforms. Previously it was
89+
only Linux, macOS, and FreeBSD.
90+
[#8054](https://github.com/rust-lang/cargo/pull/8054)
91+
- Artifacts generated by pre-release versions of `rustc` now share the same
92+
filenames. This means that changing nightly versions will not leave stale
93+
files in the build directory.
94+
[#8073](https://github.com/rust-lang/cargo/pull/8073)
95+
- Invalid package names are rejected when using renamed dependencies.
96+
[#8090](https://github.com/rust-lang/cargo/pull/8090)
97+
- Added a certain class of HTTP2 errors as "spurious" that will get retried.
98+
[#8102](https://github.com/rust-lang/cargo/pull/8102)
2899

29100
### Fixed
30101
- Cargo no longer buffers excessive amounts of compiler output in memory.
31102
[#7838](https://github.com/rust-lang/cargo/pull/7838)
32103
- Symbolic links in git repositories now work on Windows.
33104
[#7996](https://github.com/rust-lang/cargo/pull/7996)
105+
- Fixed an issue where `profile.dev` was not loaded from a config file with
106+
`cargo test` when the `dev` profile was not defined in `Cargo.toml`.
107+
[#8012](https://github.com/rust-lang/cargo/pull/8012)
108+
- When a binary is built as an implicit dependency of an integration test,
109+
it now checks `dep_name/feature_name` syntax in `required-features` correctly.
110+
[#8020](https://github.com/rust-lang/cargo/pull/8020)
111+
- Fixed an issue where Cargo would not detect that an executable (such as an
112+
integration test) needs to be rebuilt when the previous build was
113+
interrupted with Ctrl-C.
114+
[#8087](https://github.com/rust-lang/cargo/pull/8087)
115+
- Protect against some (unknown) situations where Cargo could panic when the
116+
system monotonic clock doesn't appear to be monotonic.
117+
[#8114](https://github.com/rust-lang/cargo/pull/8114)
34118

35119
### Nightly only
36120
- Fixed panic with new feature resolver and required-features.
37121
[#7962](https://github.com/rust-lang/cargo/pull/7962)
122+
- Added `RUSTC_WORKSPACE_WRAPPER` environment variable, which provides a way
123+
to wrap `rustc` for workspace members only, and affects the filename hash so
124+
that artifacts produced by the wrapper are cached separately. This usage can
125+
be seen on nightly clippy with `cargo clippy -Zunstable-options`.
126+
[#7533](https://github.com/rust-lang/cargo/pull/7533)
127+
- Added `--unit-graph` CLI option to display Cargo's internal dependency graph
128+
as JSON.
129+
[#7977](https://github.com/rust-lang/cargo/pull/7977)
130+
- Changed `-Zbuild_dep` to `-Zhost_dep`, and added proc-macros to the feature
131+
decoupling logic.
132+
[#8003](https://github.com/rust-lang/cargo/pull/8003)
133+
[#8028](https://github.com/rust-lang/cargo/pull/8028)
134+
- Fixed so that `--crate-version` is not automatically passed when the flag
135+
is found in `RUSTDOCFLAGS`.
136+
[#8014](https://github.com/rust-lang/cargo/pull/8014)
137+
- Fixed panic with `-Zfeatures=dev_dep` and `check --profile=test`.
138+
[#8027](https://github.com/rust-lang/cargo/pull/8027)
139+
- Fixed panic with `-Zfeatures=itarget` with certain host dependencies.
140+
[#8048](https://github.com/rust-lang/cargo/pull/8048)
141+
- Added support for `-Cembed-bitcode=no`, which provides a performance boost
142+
and disk-space usage reduction for non-LTO builds.
143+
[#8066](https://github.com/rust-lang/cargo/pull/8066)
144+
- `-Zpackage-features` has been extended with several changes intended to make
145+
it easier to select features on the command-line in a workspace.
146+
[#8074](https://github.com/rust-lang/cargo/pull/8074)
38147

39148
## Cargo 1.43 (2020-04-23)
40149
[9d32b7b0...rust-1.43.0](https://github.com/rust-lang/cargo/compare/9d32b7b0...rust-1.43.0)

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo"
3-
version = "0.45.0"
3+
version = "0.46.0"
44
edition = "2018"
55
authors = ["Yehuda Katz <wycats@gmail.com>",
66
"Carl Lerche <me@carllerche.com>",
@@ -32,7 +32,7 @@ pretty_env_logger = { version = "0.4", optional = true }
3232
anyhow = "1.0"
3333
filetime = "0.2.9"
3434
flate2 = { version = "1.0.3", default-features = false, features = ["zlib"] }
35-
git2 = "0.13.1"
35+
git2 = "0.13.5"
3636
git2-curl = "0.14.0"
3737
glob = "0.3.0"
3838
hex = "0.4"
@@ -44,7 +44,7 @@ jobserver = "0.1.21"
4444
lazycell = "1.2.0"
4545
libc = "0.2"
4646
log = "0.4.6"
47-
libgit2-sys = "0.12.1"
47+
libgit2-sys = "0.12.5"
4848
memchr = "2.1.3"
4949
num_cpus = "1.0"
5050
opener = "0.4"

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
x86_64-msvc:
4242
TOOLCHAIN: stable-x86_64-pc-windows-msvc
4343
OTHER_TARGET: i686-pc-windows-msvc
44+
x86_64-gnu:
45+
TOOLCHAIN: nightly-x86_64-pc-windows-gnu
46+
OTHER_TARGET: i686-pc-windows-gnu
4447

4548
- job: rustfmt
4649
pool:

ci/azure-install-rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ steps:
44
rustup set profile minimal
55
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
66
rustup update --no-self-update $TOOLCHAIN
7-
if [ "$TOOLCHAIN" = "nightly" ]; then
7+
if [[ "$TOOLCHAIN" == "nightly"* ]]; then
88
rustup component add --toolchain=$TOOLCHAIN rustc-dev
99
fi
1010
rustup default $TOOLCHAIN

crates/cargo-test-support/src/cross_compile.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ pub fn alternate() -> &'static str {
190190
"i686-unknown-linux-gnu"
191191
} else if cfg!(all(target_os = "windows", target_env = "msvc")) {
192192
"i686-pc-windows-msvc"
193+
} else if cfg!(all(target_os = "windows", target_env = "gnu")) {
194+
"i686-pc-windows-gnu"
193195
} else {
194196
panic!("This test should be gated on cross_compile::disabled.");
195197
}

crates/cargo-test-support/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ use std::path::{Path, PathBuf};
117117
use std::process::{Command, Output};
118118
use std::str;
119119
use std::time::{self, Duration};
120-
use std::usize;
121120

122121
use cargo::util::{is_ci, CargoResult, ProcessBuilder, ProcessError, Rustc};
123122
use serde_json::{self, Value};
@@ -1723,6 +1722,7 @@ fn _process(t: &OsStr) -> cargo::util::ProcessBuilder {
17231722
.env_remove("RUSTDOC")
17241723
.env_remove("RUSTC_WRAPPER")
17251724
.env_remove("RUSTFLAGS")
1725+
.env_remove("RUSTDOCFLAGS")
17261726
.env_remove("XDG_CONFIG_HOME") // see #2345
17271727
.env("GIT_CONFIG_NOSYSTEM", "1") // keep trying to sandbox ourselves
17281728
.env_remove("EMAIL")

crates/resolver-tests/tests/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ proptest! {
2525
0
2626
} else {
2727
// but that local builds will give a small clear test case.
28-
std::u32::MAX
28+
u32::MAX
2929
},
3030
result_cache: prop::test_runner::basic_result_cache,
3131
.. ProptestConfig::default()

src/bin/cargo/commands/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
2828
let opts = CleanOptions {
2929
config,
3030
spec: values(args, "package"),
31-
target: args.target(),
31+
targets: args.targets(),
3232
requested_profile: args.get_profile_name(config, "dev", ProfileChecking::Checked)?,
3333
profile_specified: args.is_present("profile") || args.is_present("release"),
3434
doc: args.is_present("doc"),

src/bin/cargo/commands/fetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
2828

2929
let opts = FetchOptions {
3030
config,
31-
target: args.target(),
31+
targets: args.targets(),
3232
};
3333
let _ = ops::fetch(&ws, &opts)?;
3434
Ok(())

src/bin/cargo/commands/metadata.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ pub fn cli() -> App {
1212
)
1313
.arg(opt("quiet", "No output printed to stdout").short("q"))
1414
.arg_features()
15-
.arg(
16-
opt(
17-
"filter-platform",
18-
"Only include resolve dependencies matching the given target-triple",
19-
)
20-
.value_name("TRIPLE"),
21-
)
15+
.arg(multi_opt(
16+
"filter-platform",
17+
"TRIPLE",
18+
"Only include resolve dependencies matching the given target-triple",
19+
))
2220
.arg(opt(
2321
"no-deps",
2422
"Output information only about the workspace members \
@@ -51,7 +49,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
5149
all_features: args.is_present("all-features"),
5250
no_default_features: args.is_present("no-default-features"),
5351
no_deps: args.is_present("no-deps"),
54-
filter_platform: args.value_of("filter-platform").map(|s| s.to_string()),
52+
filter_platforms: args._values_of("filter-platform"),
5553
version,
5654
};
5755

0 commit comments

Comments
 (0)