Skip to content

Commit 56d9f6e

Browse files
Merge from master 8067303 to rebase. Fixing merge conflicts as job_queue was moved
2 parents d6a9fff + 12dbca3 commit 56d9f6e

File tree

514 files changed

+9456
-4609
lines changed

Some content is hidden

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

514 files changed

+9456
-4609
lines changed

.github/workflows/audit.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Security audit
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- '**/Cargo.toml'
10+
- '**/Cargo.lock'
11+
push:
12+
branches:
13+
- master
14+
15+
jobs:
16+
cargo_deny:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
checks:
21+
- advisories
22+
- bans licenses sources
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: EmbarkStudios/cargo-deny-action@v1
26+
# Prevent sudden announcement of a new advisory from failing ci:
27+
continue-on-error: ${{ matrix.checks == 'advisories' }}
28+
with:
29+
command: check ${{ matrix.checks }}
30+
rust-version: stable

.github/workflows/contrib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Install mdbook
2020
run: |
2121
mkdir mdbook
22-
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.9/mdbook-v0.4.9-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
22+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
2323
echo `pwd`/mdbook >> $GITHUB_PATH
2424
- name: Deploy docs
2525
run: |

.github/workflows/main.yml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,25 @@ jobs:
2828
cargo fmt --all --manifest-path $manifest --check
2929
done
3030
31+
# Ensure there are no clippy warnings
32+
clippy:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v3
36+
- run: rustup update stable && rustup default stable
37+
- run: rustup component add clippy
38+
# Only check cargo lib for now
39+
- run: cargo clippy -p cargo --lib -- -D warnings
40+
3141
test:
3242
runs-on: ${{ matrix.os }}
3343
env:
3444
CARGO_PROFILE_DEV_DEBUG: 1
3545
CARGO_PROFILE_TEST_DEBUG: 1
3646
CARGO_INCREMENTAL: 0
3747
CARGO_PUBLIC_NETWORK_TESTS: 1
48+
# Deny warnings on CI to avoid warnings getting into the codebase.
49+
RUSTFLAGS: -D warnings
3850
strategy:
3951
matrix:
4052
include:
@@ -54,11 +66,15 @@ jobs:
5466
os: macos-latest
5567
rust: stable
5668
other: x86_64-apple-ios
69+
- name: macOS x86_64 nightly
70+
os: macos-latest
71+
rust: nightly
72+
other: x86_64-apple-ios
5773
- name: Windows x86_64 MSVC stable
5874
os: windows-latest
5975
rust: stable-msvc
6076
other: i686-pc-windows-msvc
61-
- name: Windows x86_64 gnu nightly
77+
- name: Windows x86_64 gnu nightly # runs out of space while trying to link the test suite
6278
os: windows-latest
6379
rust: nightly-gnu
6480
other: i686-pc-windows-gnu
@@ -85,9 +101,17 @@ jobs:
85101
run: echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
86102
if: "!contains(matrix.rust, 'stable')"
87103

88-
# Deny warnings on CI to avoid warnings getting into the codebase.
89-
- run: cargo test --features 'deny-warnings'
90-
# The testsuite generates a huge amount of data, and fetch-smoke-test was
104+
- run: cargo test
105+
- name: Clear intermediate test output
106+
run: |
107+
df -h
108+
rm -rf target/tmp
109+
df -h
110+
- name: gitoxide tests (all git-related tests)
111+
run: cargo test git
112+
env:
113+
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1
114+
# The testsuite generates a huge amount of data, and fetch-smoke-test was
91115
# running out of disk space.
92116
- name: Clear test output
93117
run: |
@@ -100,8 +124,8 @@ jobs:
100124
run: |
101125
# This only tests `cargo fix` because fix-proxy-mode is one of the most
102126
# complicated subprocess management in Cargo.
103-
cargo test --test testsuite --features 'deny-warnings' -- fix::
104-
- run: cargo test --features 'deny-warnings' --manifest-path crates/cargo-test-support/Cargo.toml
127+
cargo test --test testsuite -- fix::
128+
- run: cargo test --manifest-path crates/cargo-test-support/Cargo.toml
105129
env:
106130
CARGO_TARGET_DIR: target
107131
- run: cargo test -p cargo-platform
@@ -141,6 +165,18 @@ jobs:
141165
- run: rustup update stable && rustup default stable
142166
- run: cargo test --manifest-path crates/resolver-tests/Cargo.toml
143167

168+
test_gitoxide:
169+
runs-on: ubuntu-latest
170+
steps:
171+
- uses: actions/checkout@v3
172+
- run: rustup update --no-self-update stable && rustup default stable
173+
- run: rustup target add i686-unknown-linux-gnu
174+
- run: sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y
175+
- run: rustup component add rustfmt || echo "rustfmt not available"
176+
- run: cargo test
177+
env:
178+
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1
179+
144180
build_std:
145181
runs-on: ubuntu-latest
146182
env:
@@ -165,7 +201,7 @@ jobs:
165201
- run: cd src/doc/semver-check && cargo +stable run
166202
- run: |
167203
mkdir mdbook
168-
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
204+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
169205
echo `pwd`/mdbook >> $GITHUB_PATH
170206
- run: cargo doc --document-private-items --no-deps
171207
env:
@@ -181,7 +217,7 @@ jobs:
181217
permissions:
182218
contents: none
183219
name: bors build finished
184-
needs: [docs, rustfmt, test, resolver, build_std]
220+
needs: [docs, rustfmt, test, resolver, build_std, test_gitoxide]
185221
runs-on: ubuntu-latest
186222
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
187223
steps:

CHANGELOG.md

Lines changed: 109 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,136 @@
11
# Changelog
22

3+
## Cargo 1.69 (2023-04-20)
4+
[985d561f...HEAD](https://github.com/rust-lang/cargo/compare/985d561f...HEAD)
5+
6+
### Added
7+
8+
- Cargo now suggests `cargo fix` or `cargo clippy --fix`
9+
when compilation warnings/errors can be auto-fixed.
10+
[#11558](https://github.com/rust-lang/cargo/pull/11558)
11+
12+
### Changed
13+
14+
- ❗ When `default-features` is set to false of a workspace dependency,
15+
and an inherited dependency of a member has `default-features = true`,
16+
Cargo will enable default features of that dependency.
17+
[#11409](https://github.com/rust-lang/cargo/pull/11409)
18+
- `cargo add` now checks only the order of `[dependencies]`
19+
without considering `[dependencies.*]`.
20+
[#11612](https://github.com/rust-lang/cargo/pull/11612)
21+
- Several documentation improvements.
22+
[#11576](https://github.com/rust-lang/cargo/pull/11576)
23+
[#11604](https://github.com/rust-lang/cargo/pull/11604)
24+
[#11620](https://github.com/rust-lang/cargo/pull/11620)
25+
[#11603](https://github.com/rust-lang/cargo/pull/11603)
26+
27+
### Fixed
28+
29+
- Fixed build scripts triggering recompiles when a `rerun-if-changed` points to
30+
a directory whose mtime is not preserved by the filesystem.
31+
[#11613](https://github.com/rust-lang/cargo/pull/11613)
32+
- Fixed panics when using dependencies from `[workspace.dependencies]`
33+
for `[patch]`. This usage is not supposed to be supported.
34+
[#11565](https://github.com/rust-lang/cargo/pull/11565)
35+
36+
### Nightly only
37+
338
## Cargo 1.68 (2023-03-09)
4-
[f6e737b1...HEAD](https://github.com/rust-lang/cargo/compare/f6e737b1...HEAD)
39+
[f6e737b1...rust-1.68.0](https://github.com/rust-lang/cargo/compare/f6e737b1...rust-1.68.0)
540

641
### Added
742

8-
- Cargo's file locking mechanism now supports Solaris by using fcntl.
9-
[#11439](https://github.com/rust-lang/cargo/pull/11439)
10-
[#11474](https://github.com/rust-lang/cargo/pull/11474)
11-
- `home` crate is now a subcrate in `rust-lang/cargo` repository. Welcome!
43+
- 🎉 The new "sparse" protocol has been stabilized.
44+
It should provide a significant performance improvement when accessing crates.io.
45+
([RFC 2789](https://github.com/rust-lang/rfcs/blob/master/text/2789-sparse-index.md))
46+
([docs](https://doc.rust-lang.org/nightly/cargo/reference/registries.html#registry-protocols))
47+
[#11224](https://github.com/rust-lang/cargo/pull/11224)
48+
[#11480](https://github.com/rust-lang/cargo/pull/11480)
49+
- 🎉 `home` crate is now a subcrate in `rust-lang/cargo` repository. Welcome!
1250
[#11359](https://github.com/rust-lang/cargo/pull/11359)
1351
[#11481](https://github.com/rust-lang/cargo/pull/11481)
52+
- Long diagnostic messages now can be truncated to be more readable.
53+
[#11494](https://github.com/rust-lang/cargo/pull/11494)
54+
- Shows the progress of crates.io index update even when `net.git-fetch-with-cli` enabled.
55+
[#11579](https://github.com/rust-lang/cargo/pull/11579)
56+
- `cargo build --verbose` tells you more about why it recompiles.
57+
[#11407](https://github.com/rust-lang/cargo/pull/11407)
58+
- Cargo's file locking mechanism now supports Solaris by using `fcntl`.
59+
[#11439](https://github.com/rust-lang/cargo/pull/11439)
60+
[#11474](https://github.com/rust-lang/cargo/pull/11474)
61+
- Added a new SemVer compatibility rule explaining the expectations around diagnostic lints
62+
[#11596](https://github.com/rust-lang/cargo/pull/11596)
63+
- `cargo vendor` generates a different source replacement entry
64+
for each revision from the same git repository.
65+
[#10690](https://github.com/rust-lang/cargo/pull/1090)
66+
- Cargo contributors can relabel issues via triagebot.
67+
[doc](https://github.com/rust-lang/triagebot/wiki/Labeling)
68+
[#11498](https://github.com/rust-lang/cargo/pull/11498)
69+
- Cargo contributors can write tests in containers.
70+
[#11583](https://github.com/rust-lang/cargo/pull/11583)
1471

1572
### Changed
1673

17-
- Split up registry documentation into multiple sections.
18-
[#11480](https://github.com/rust-lang/cargo/pull/11480)
74+
- Cargo now by default saves credentials to `.cargo/credentials.toml`.
75+
If `.cargo/credentials` exists, writes to it for backward compatibility reasons.
76+
[#11533](https://github.com/rust-lang/cargo/pull/11533)
77+
- To prevent sensitive data from being logged, Cargo introduces a new wrapper type internally.
78+
[#11545](https://github.com/rust-lang/cargo/pull/11545)
79+
- Several documentation improvements.
80+
[#11475](https://github.com/rust-lang/cargo/pull/11475)
81+
[#11504](https://github.com/rust-lang/cargo/pull/11504)
82+
[#11516](https://github.com/rust-lang/cargo/pull/11516)
83+
[#11517](https://github.com/rust-lang/cargo/pull/11517)
84+
[#11568](https://github.com/rust-lang/cargo/pull/11568)
85+
[#11586](https://github.com/rust-lang/cargo/pull/11586)
86+
[#11592](https://github.com/rust-lang/cargo/pull/11592)
1987

2088
### Fixed
2189

90+
-`cargo package` and `cargo publish` now respects workspace's `Cargo.lock`.
91+
This is an expected behavior but previously got overlooked.
92+
[#11477](https://github.com/rust-lang/cargo/pull/11477)
93+
- Fixed `cargo vendor` failing on resolving git dependencies inherited from a workspace.
94+
[#11414](https://github.com/rust-lang/cargo/pull/11414)
95+
- `cargo install` can now correctly install root package when `workspace.default-members` is specified.
96+
[#11067](https://github.com/rust-lang/cargo/pull/11067)
97+
- Fixed panic on target specific dependency errors.
98+
[#11541](https://github.com/rust-lang/cargo/pull/11541)
99+
- Shows `--help` if there is no man page for a subcommand.
100+
[#11473](https://github.com/rust-lang/cargo/pull/11473)
22101
- Setting `target.cfg(…).rustflags` shouldn't erase `build.rustdocflags`.
23102
[#11323](https://github.com/rust-lang/cargo/pull/11323)
103+
- Unsupported `profile.split-debuginfo` options are now ignored,
104+
which previously made Cargo fail to compile on certain platforms.
105+
[#11347](https://github.com/rust-lang/cargo/pull/11347)
106+
[#11633](https://github.com/rust-lang/cargo/pull/11633)
24107

25108
### Nightly only
26109

27-
- Suggests `cargo clippy --fix` when warnings/errors should be fixed with clippy.
110+
- Implemented a inital support of asymmetric token authentication for registries.
111+
([RFC 3231](https://github.com/rust-lang/rfcs/blob/master/text/3231-cargo-asymmetric-tokens.md))
112+
([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#registry-auth))
113+
[#10771](https://github.com/rust-lang/cargo/pull/10771)
114+
- Do not error for `auth-required: true` without `-Z sparse-registry`
115+
[#11661](https://github.com/rust-lang/cargo/pull/11661)
116+
- Supports `codegen-backend` and `rustflags` in profiles in config file.
117+
[#11562](https://github.com/rust-lang/cargo/pull/11562)
118+
- Suggests `cargo clippy --fix` when warnings/errors could be fixed with clippy.
28119
[#11399](https://github.com/rust-lang/cargo/pull/11399)
29120
- Fixed artifact deps not working when target field specified coexists with `optional = true`.
30121
[#11434](https://github.com/rust-lang/cargo/pull/11434)
122+
- Make Cargo distinguish `Unit`s with and without artifact targets.
123+
[#11478](https://github.com/rust-lang/cargo/pull/11478)
124+
- `cargo metadata` supports artifact dependencies.
125+
[#11550](https://github.com/rust-lang/cargo/pull/11550)
31126
- Allows builds of some crate to fail during optional doc-scraping.
32127
[#11450](https://github.com/rust-lang/cargo/pull/11450)
128+
- Add warning if potentially-scrapable examples are skipped due to dev-dependencies.
129+
[#11503](https://github.com/rust-lang/cargo/pull/11503)
130+
- Don't scrape examples from library targets by default.
131+
[#11499](https://github.com/rust-lang/cargo/pull/11499)
132+
- Fixed examples of proc-macro crates being scraped for examples.
133+
[#11497](https://github.com/rust-lang/cargo/pull/11497)
33134

34135
## Cargo 1.67 (2023-01-26)
35136
[7e484fc1...rust-1.67.0](https://github.com/rust-lang/cargo/compare/7e484fc1...rust-1.67.0)

0 commit comments

Comments
 (0)