Skip to content

Commit d83a2d6

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 7553724 + f84f3f8 commit d83a2d6

File tree

260 files changed

+10105
-3122
lines changed

Some content is hidden

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

260 files changed

+10105
-3122
lines changed

.github/workflows/main.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: CI
2+
on:
3+
push:
4+
branches-ignore: [master]
5+
pull_request:
6+
branches: ['*']
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
# Check Code style quickly by running `rustfmt` over all code
14+
rustfmt:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- run: rustup update stable && rustup default stable
19+
- run: rustup component add rustfmt
20+
- run: cargo fmt --all -- --check
21+
- run: cd crates/cargo-test-macro && cargo fmt --all -- --check
22+
- run: cd crates/cargo-test-support && cargo fmt --all -- --check
23+
- run: cd crates/crates-io && cargo fmt --all -- --check
24+
- run: cd crates/resolver-tests && cargo fmt --all -- --check
25+
- run: cd crates/cargo-platform && cargo fmt --all -- --check
26+
27+
test:
28+
runs-on: ${{ matrix.os }}
29+
env:
30+
CARGO_PROFILE_DEV_DEBUG: 1
31+
CARGO_PROFILE_TEST_DEBUG: 1
32+
CARGO_INCREMENTAL: 0
33+
strategy:
34+
matrix:
35+
include:
36+
- os: ubuntu-latest
37+
rust: stable
38+
other: i686-unknown-linux-gnu
39+
- os: ubuntu-latest
40+
rust: beta
41+
other: i686-unknown-linux-gnu
42+
- os: ubuntu-latest
43+
rust: nightly
44+
other: i686-unknown-linux-gnu
45+
- os: macos-latest
46+
rust: stable
47+
other: x86_64-apple-ios
48+
- os: windows-latest
49+
rust: stable-msvc
50+
other: i686-pc-windows-msvc
51+
- os: windows-latest
52+
rust: nightly-gnu
53+
other: i686-pc-windows-gnu
54+
steps:
55+
- uses: actions/checkout@v2
56+
- run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
57+
- run: rustup target add ${{ matrix.other }}
58+
- run: rustup component add rustc-dev llvm-tools-preview rust-docs
59+
if: startsWith(matrix.rust, 'nightly')
60+
- run: sudo apt update -y && sudo apt install gcc-multilib -y
61+
if: matrix.os == 'ubuntu-latest'
62+
- run: rustup component add rustfmt || echo "rustfmt not available"
63+
64+
# Deny warnings on CI to avoid warnings getting into the codebase, and note
65+
# the `force-system-lib-on-osx` which is intended to fix compile issues on
66+
# OSX where compiling curl from source on OSX yields linker errors on Azure.
67+
#
68+
# Note that the curl issue is traced back to alexcrichton/curl-rust#279
69+
# where it looks like the OSX version we're actually running on is such that
70+
# a symbol is emitted that's never worked. For now force the system library
71+
# to be used to fix the link errors.
72+
- run: cargo test --features 'deny-warnings curl/force-system-lib-on-osx'
73+
- run: cargo test -p cargo-test-support
74+
- run: cargo test -p cargo-platform
75+
76+
resolver:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@v2
80+
- run: rustup update stable && rustup default stable
81+
- run: cargo test --manifest-path crates/resolver-tests/Cargo.toml
82+
83+
build_std:
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v2
87+
- run: rustup update nightly && rustup default nightly
88+
- run: rustup component add rust-src
89+
- run: cargo build
90+
- run: cargo test --test build-std
91+
env:
92+
CARGO_RUN_BUILD_STD_TESTS: 1
93+
docs:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v2
97+
- run: rustup update nightly && rustup default nightly
98+
- run: rustup component add rust-docs
99+
- run: |
100+
mkdir mdbook
101+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
102+
echo ::add-path::`pwd`/mdbook
103+
- run: cargo doc --no-deps
104+
- run: cd src/doc && mdbook build --dest-dir ../../target/doc
105+
- run: |
106+
cd src/doc
107+
curl -sSLo linkcheck.sh \
108+
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
109+
sh linkcheck.sh --all cargo
110+
111+
success:
112+
name: bors build finished
113+
needs: [docs, rustfmt, test, resolver, build_std]
114+
runs-on: ubuntu-latest
115+
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
116+
steps:
117+
- run: echo ok
118+
failure:
119+
name: bors build finished
120+
needs: [docs, rustfmt, test, resolver, build_std]
121+
runs-on: ubuntu-latest
122+
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
123+
steps:
124+
- run: exit 1

CHANGELOG.md

Lines changed: 148 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
11
# Changelog
22

3+
## Cargo 1.46 (2020-08-27)
4+
[9fcb8c1d...HEAD](https://github.com/rust-lang/cargo/compare/9fcb8c1d...HEAD)
5+
6+
### Added
7+
8+
### Changed
9+
- A warning is now displayed if a git dependency includes a `#` fragment in
10+
the URL. This was potentially confusing because Cargo itself displays git
11+
URLs with this syntax, but it does not have any meaning outside of the
12+
`Cargo.lock` file, and would not work properly.
13+
[#8297](https://github.com/rust-lang/cargo/pull/8297)
14+
15+
### Fixed
16+
- Fixed a rare situation where an update to `Cargo.lock` failed once, but then
17+
subsequent runs allowed it proceed.
18+
[#8274](https://github.com/rust-lang/cargo/pull/8274)
19+
- Removed assertion that Windows dylibs must have a `.dll` extension. Some
20+
custom JSON spec targets may change the extension.
21+
[#8310](https://github.com/rust-lang/cargo/pull/8310)
22+
- Updated libgit2, which brings in a fix for zlib errors for some remote
23+
git servers like googlesource.com.
24+
[#8320](https://github.com/rust-lang/cargo/pull/8320)
25+
26+
### Nightly only
27+
- Added `-Zrustdoc-map` feature which provides external mappings for rustdoc
28+
(such as https://docs.rs/ links).
29+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-map)
30+
[#8287](https://github.com/rust-lang/cargo/pull/8287)
31+
- Fixed feature calculation when a proc-macro is declared in `Cargo.toml` with
32+
an underscore (like `proc_macro = true`).
33+
[#8319](https://github.com/rust-lang/cargo/pull/8319)
34+
35+
336
## Cargo 1.45 (2020-07-16)
4-
[ebda5065e...HEAD](https://github.com/rust-lang/cargo/compare/ebda5065e...HEAD)
37+
[ebda5065e...rust-1.45.0](https://github.com/rust-lang/cargo/compare/ebda5065...rust-1.45.0)
538

639
### Added
740

@@ -29,11 +62,105 @@
2962
directory. Some obscure scenarios can cause an old dylib to be referenced
3063
between builds, and this ensures that all the latest copies are used.
3164
[#8139](https://github.com/rust-lang/cargo/pull/8139)
65+
- `package.exclude` can now match directory names. If a directory is
66+
specified, the entire directory will be excluded, and Cargo will not attempt
67+
to inspect it further. Previously Cargo would try to check every file in the
68+
directory which could cause problems if the directory contained unreadable
69+
files.
70+
[#8095](https://github.com/rust-lang/cargo/pull/8095)
71+
- When packaging with `cargo publish` or `cargo package`, Cargo can use git to
72+
guide its decision on which files to include. Previously this git-based
73+
logic required a `Cargo.toml` file to exist at the root of the repository.
74+
This is no longer required, so Cargo will now use git-based guidance even if
75+
there is not a `Cargo.toml` in the root of the repository.
76+
[#8095](https://github.com/rust-lang/cargo/pull/8095)
77+
- While unpacking a crate on Windows, if it fails to write a file because the
78+
file is a reserved Windows filename (like "aux.rs"), Cargo will display an
79+
extra message to explain why it failed.
80+
[#8136](https://github.com/rust-lang/cargo/pull/8136)
81+
- Failures to set mtime on files are now ignored. Some filesystems did not
82+
support this.
83+
[#8185](https://github.com/rust-lang/cargo/pull/8185)
84+
- Certain classes of git errors will now recommend enabling
85+
`net.git-fetch-with-cli`.
86+
[#8166](https://github.com/rust-lang/cargo/pull/8166)
87+
- When doing an LTO build, Cargo will now instruct rustc not to perform
88+
codegen when possible. This may result in a faster build and use less disk
89+
space. Additionally, for non-LTO builds, Cargo will instruct rustc to not
90+
embed LLVM bitcode in libraries, which should decrease their size.
91+
[#8192](https://github.com/rust-lang/cargo/pull/8192)
92+
[#8226](https://github.com/rust-lang/cargo/pull/8226)
93+
[#8254](https://github.com/rust-lang/cargo/pull/8254)
94+
- The implementation for `cargo clean -p` has been rewritten so that it can
95+
more accurately remove the files for a specific package.
96+
[#8210](https://github.com/rust-lang/cargo/pull/8210)
97+
- The way Cargo computes the outputs from a build has been rewritten to be
98+
more complete and accurate. Newly tracked files will be displayed in JSON
99+
messages, and may be uplifted to the output directory in some cases. Some of
100+
the changes from this are:
101+
102+
- `.exp` export files on Windows MSVC dynamic libraries are now tracked.
103+
- Proc-macros on Windows track import/export files.
104+
- All targets (like tests, etc.) that generate separate debug files
105+
(pdb/dSYM) are tracked.
106+
- Added .map files for wasm32-unknown-emscripten.
107+
- macOS dSYM directories are tracked for all dynamic libraries
108+
(dylib/cdylib/proc-macro) and for build scripts.
109+
110+
There are a variety of other changes as a consequence of this:
111+
112+
- Binary examples on Windows MSVC with a hyphen will now show up twice in
113+
the examples directory (`foo_bar.exe` and `foo-bar.exe`). Previously Cargo
114+
just renamed the file instead of hard-linking it.
115+
- Example libraries now follow the same rules for hyphen/underscore
116+
translation as normal libs (they will now use underscores).
117+
118+
[#8210](https://github.com/rust-lang/cargo/pull/8210)
119+
- Cargo attempts to scrub any secrets from the debug log for HTTP debugging.
120+
[#8222](https://github.com/rust-lang/cargo/pull/8222)
121+
- Context has been added to many of Cargo's filesystem operations, so that
122+
error messages now provide more information, such as the path that caused
123+
the problem.
124+
[#8232](https://github.com/rust-lang/cargo/pull/8232)
125+
- Several commands now ignore the error if stdout or stderr is closed while it
126+
is running. For example `cargo install --list | grep -q cargo-fuzz` would
127+
previously sometimes panic because `grep -q` may close stdout before the
128+
command finishes. Regular builds continue to fail if stdout or stderr is
129+
closed, matching the behavior of many other build systems.
130+
[#8236](https://github.com/rust-lang/cargo/pull/8236)
131+
- If `cargo install` is given an exact version, like `--version=1.2.3`, it
132+
will now avoid updating the index if that version is already installed, and
133+
exit quickly indicating it is already installed.
134+
[#8022](https://github.com/rust-lang/cargo/pull/8022)
135+
- Changes to the `[patch]` section will now attempt to automatically update
136+
`Cargo.lock` to the new version. It should now also provide better error
137+
messages for the rare cases where it is unable to automatically update.
138+
[#8248](https://github.com/rust-lang/cargo/pull/8248)
32139

33140
### Fixed
34141
- Fixed copying Windows `.pdb` files to the output directory when the filename
35142
contained dashes.
36143
[#8123](https://github.com/rust-lang/cargo/pull/8123)
144+
- Fixed error where Cargo would fail when scanning if a package is inside a
145+
git repository when any of its ancestor paths is a symlink.
146+
[#8186](https://github.com/rust-lang/cargo/pull/8186)
147+
- Fixed `cargo update` with an unused `[patch]` so that it does not get
148+
stuck and refuse to update.
149+
[#8243](https://github.com/rust-lang/cargo/pull/8243)
150+
- Fixed a situation where Cargo would hang if stderr is closed, and the
151+
compiler generated a large number of messages.
152+
[#8247](https://github.com/rust-lang/cargo/pull/8247)
153+
- Fixed backtraces on macOS not showing filenames or line numbers. As a
154+
consequence of this, binary executables on apple targets do not include a
155+
hash in the filename in Cargo's cache. This means Cargo can only track one
156+
copy, so if you switch features or rustc versions, Cargo will need to
157+
rebuild the executable.
158+
[#8329](https://github.com/rust-lang/cargo/pull/8329)
159+
[#8335](https://github.com/rust-lang/cargo/pull/8335)
160+
- Fixed fingerprinting when using lld on Windows with a dylib. Cargo was
161+
erroneously thinking the dylib was never fresh.
162+
[#8290](https://github.com/rust-lang/cargo/pull/8290)
163+
[#8335](https://github.com/rust-lang/cargo/pull/8335)
37164

38165
### Nightly only
39166
- Fixed passing the full path for `--target` to `rustdoc` when using JSON spec
@@ -44,9 +171,22 @@
44171
- Added new `resolver` field to `Cargo.toml` to opt-in to the new feature
45172
resolver.
46173
[#8129](https://github.com/rust-lang/cargo/pull/8129)
174+
- `-Zbuild-std` no longer treats std dependencies as "local". This means that
175+
it won't use incremental compilation for those dependencies, removes them
176+
from dep-info files, and caps lints at "allow".
177+
[#8177](https://github.com/rust-lang/cargo/pull/8177)
178+
- Added `-Zmultitarget` which allows multiple `--target` flags to build the
179+
same thing for multiple targets at once.
180+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#multitarget)
181+
[#8167](https://github.com/rust-lang/cargo/pull/8167)
182+
- Added `strip` option to the profile to remove symbols and debug information.
183+
[docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-strip-option)
184+
[#8246](https://github.com/rust-lang/cargo/pull/8246)
185+
- Fixed panic with `cargo tree --target=all -Zfeatures=all`.
186+
[#8269](https://github.com/rust-lang/cargo/pull/8269)
47187

48188
## Cargo 1.44 (2020-06-04)
49-
[bda50510...ebda5065e](https://github.com/rust-lang/cargo/compare/bda50510...ebda5065e)
189+
[bda50510...rust-1.44.0](https://github.com/rust-lang/cargo/compare/bda50510...rust-1.44.0)
50190

51191
### Added
52192
- 🔥 Added the `cargo tree` command.
@@ -96,6 +236,10 @@
96236
[#8090](https://github.com/rust-lang/cargo/pull/8090)
97237
- Added a certain class of HTTP2 errors as "spurious" that will get retried.
98238
[#8102](https://github.com/rust-lang/cargo/pull/8102)
239+
- Allow `cargo package --list` to succeed, even if there are other validation
240+
errors (such as `Cargo.lock` generation problem, or missing dependencies).
241+
[#8175](https://github.com/rust-lang/cargo/pull/8175)
242+
[#8215](https://github.com/rust-lang/cargo/pull/8215)
99243

100244
### Fixed
101245
- Cargo no longer buffers excessive amounts of compiler output in memory.
@@ -115,6 +259,8 @@
115259
- Protect against some (unknown) situations where Cargo could panic when the
116260
system monotonic clock doesn't appear to be monotonic.
117261
[#8114](https://github.com/rust-lang/cargo/pull/8114)
262+
- Fixed panic with `cargo clean -p` if the package has a build script.
263+
[#8216](https://github.com/rust-lang/cargo/pull/8216)
118264

119265
### Nightly only
120266
- Fixed panic with new feature resolver and required-features.

CONTRIBUTING.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describes the high-level structure of Cargo and [E-easy] bugs on the
66
issue tracker.
77

88
If you have a general question about Cargo or it's internals, feel free to ask
9-
on [Discord].
9+
on [Zulip].
1010

1111
## Code of Conduct
1212

@@ -54,7 +54,7 @@ a working solution faster as it can iterate outside of cargo's release cadence.
5454
If you're looking for somewhere to start, check out the [E-easy][E-Easy] and
5555
[E-mentor][E-mentor] tags.
5656

57-
Feel free to ask for guidelines on how to tackle a problem on [Discord] or open a
57+
Feel free to ask for guidelines on how to tackle a problem on [Zulip] or open a
5858
[new issue][new-issues]. This is especially important if you want to add new
5959
features to Cargo or make large changes to the already existing code-base.
6060
Cargo's core developers will do their best to provide help.
@@ -118,10 +118,11 @@ If you can't install an alternate target, you can set the
118118
`CFG_DISABLE_CROSS_TESTS=1` environment variable to disable these tests. The
119119
Windows cross tests only support the MSVC toolchain.
120120

121-
Some of the nightly tests require the `rustc-dev` component installed. This
122-
component includes the compiler as a library. This may already be installed
123-
with your nightly toolchain, but it if isn't, run `rustup component add
124-
rustc-dev --toolchain=nightly`.
121+
Some of the nightly tests require the `rustc-dev` and `llvm-tools-preview`
122+
rustup components installed. These components include the compiler as a
123+
library. This may already be installed with your nightly toolchain, but if it
124+
isn't, run `rustup component add rustc-dev llvm-tools-preview
125+
--toolchain=nightly`.
125126

126127
There are several other packages in the repo for running specialized tests,
127128
and you will need to run these tests separately by changing into its directory
@@ -144,7 +145,7 @@ the `CARGO_RUN_BUILD_STD_TESTS=1` environment variable and running `cargo test
144145
After the pull request is made, a friendly bot will automatically assign a
145146
reviewer; the review-process will make sure that the proposed changes are
146147
sound. Please give the assigned reviewer sufficient time, especially during
147-
weekends. If you don't get a reply, you may poke the core developers on [Discord].
148+
weekends. If you don't get a reply, you may poke the core developers on [Zulip].
148149

149150
A merge of Cargo's master-branch and your changes is immediately queued
150151
to be tested after the pull request is made. In case unforeseen
@@ -225,7 +226,7 @@ adding labels to triage issues:
225226
[E-mentor]: https://github.com/rust-lang/cargo/labels/E-mentor
226227
[I-nominated]: https://github.com/rust-lang/cargo/labels/I-nominated
227228
[Code of Conduct]: https://www.rust-lang.org/conduct.html
228-
[Discord]: https://discordapp.com/invite/rust-lang
229+
[Zulip]: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo
229230
[`crates/cargo-test-support/src/lib.rs`]: crates/cargo-test-support/src/lib.rs
230231
[irlo]: https://internals.rust-lang.org/
231232
[subcommands]: https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands

0 commit comments

Comments
 (0)