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

1.83 update #8

Closed
wants to merge 1,373 commits into from
Closed
Changes from 4 commits
Commits
Show all changes
1373 commits
Select commit Hold shift + click to select a range
faee9a7
Use the shared infer_registry function for publishing
jneem Sep 3, 2024
3121a71
Don't bind Operation::Read
jneem Sep 3, 2024
431d84a
Factor out poll_one_package
jneem Sep 3, 2024
a016e5f
Multi-package publishing
jneem Sep 3, 2024
c015a00
test(new): Verify ../path behavior with workspaces
epage Sep 6, 2024
6a3255c
refactor(new): Ensure we always talk about the xame manifest
epage Sep 6, 2024
f8467c6
fix(new): Add to workspace relative to manifest, not current-dir
epage Sep 6, 2024
be1bbda
Auto merge of #14433 - tweag:multi-package-publishing-rebased, r=epage
bors Sep 6, 2024
e865450
Fix lookup_path_base to take workspace_root as &Path instead of &PathBuf
dpaoliello Aug 27, 2024
8de5554
Implement path-bases (RFC 3529) 2/n: `cargo add` support
dpaoliello Jan 3, 2024
e0a1918
test(publish): Show publishing existing version
stupendoussuperpowers Feb 29, 2024
0a84f1f
refactor(registry): Expose the registry source for reuse
epage Sep 6, 2024
6ede1e2
fix(publish): Bail on existing version
stupendoussuperpowers Feb 29, 2024
64c4b6d
Auto merge of #14427 - dpaoliello:add, r=epage
bors Sep 6, 2024
dcb4ef9
Auto merge of #14448 - stupendoussuperpowers:bail, r=epage
bors Sep 6, 2024
1c8509b
fix(toml): Don't require MSRV bump for pub/priv
epage Sep 6, 2024
2ddc46a
Auto merge of #14507 - epage:public-on-stable, r=weihanglo
bors Sep 7, 2024
6829bf7
test: public dependencies don't show up in `cargo-metadata`
eopb Sep 6, 2024
ac7d8c1
refactor: intorduce `Dependency::serialized` replacing `Serialize` impl
eopb Sep 6, 2024
fe96006
feat: include public/private dependency status in `cargo metadata` ou…
eopb Sep 6, 2024
3783494
docs: include new `public` flag in metadata schema
eopb Sep 6, 2024
059c7e4
docs: bin source can be `src/main.rs` and/or in `src/bin/`
nekomachi-touge Sep 7, 2024
1149535
Auto merge of #14515 - nekomachi-touge:cargo-isssue-14463, r=weihanglo
bors Sep 8, 2024
2351a93
Remove unnecessary symbols
cuishuang Sep 9, 2024
d0cb869
Auto merge of #14519 - cuishuang:master, r=epage
bors Sep 9, 2024
f25806c
test: Add test codebase for shell completions
shannmu Sep 9, 2024
b958d79
Auto merge of #14504 - eopb:push-xknxowwslrpt, r=epage
bors Sep 9, 2024
0b390cd
Auto merge of #14499 - felixmoebius:rustc-crate-type-parsing, r=weiha…
bors Sep 9, 2024
bd5f32b
Auto merge of #14505 - epage:new, r=weihanglo
bors Sep 9, 2024
84caa83
feat: Add native completions with `CompleteEnv` and under the nightly…
shannmu Sep 9, 2024
7b0b977
ci: Install `zsh`, `fish` and `elvish` on ubuntu-lastest for the `tes…
shannmu Sep 10, 2024
e7ca9be
Auto merge of #14493 - shannmu:dynamic_switch, r=epage
bors Sep 10, 2024
b9b1873
Update docs for how cargo is published
ehuss Sep 11, 2024
9736f32
Auto merge of #14539 - ehuss:update-release-docs, r=weihanglo
bors Sep 11, 2024
8a6c9ae
docs: Feature resolver version 2: clarify use of 'target'
RalfJung Sep 12, 2024
5fa43ee
test(vendor): add test case updating git dependency without version c…
stormshield-guillaumed Sep 11, 2024
a53b81a
fix(vendor): trust crate version only when coming from registries
stormshield-guillaumed Sep 11, 2024
38b6ae0
Cargo is a Proper Name
RalfJung Sep 12, 2024
643a025
Auto merge of #14540 - RalfJung:docs-target, r=weihanglo
bors Sep 12, 2024
2107a43
refactor(update): Clarify what each checks intention is
epage Sep 13, 2024
47f4cdc
Disable the shell_completions tests
ehuss Sep 14, 2024
d949021
Auto merge of #14530 - stormshield-guillaumed:vendor, r=weihanglo
bors Sep 14, 2024
468f150
Auto merge of #14546 - ehuss:disable-shell-completions, r=weihanglo
bors Sep 14, 2024
93fc564
feat: Add custom completer for completing bin names
shannmu Aug 14, 2024
fcaafa4
chore: revert change to Cargo.lock in f25806c472fd36f1ab0a8ba8a6a003f…
weihanglo Sep 15, 2024
4689efe
chore: necessary lock updates for `clap_complete`
weihanglo Sep 15, 2024
954581b
feat: Add custom completer for completing installed binaries
shannmu Aug 12, 2024
a9a418d
Auto merge of #14547 - weihanglo:only-update-clap, r=ehuss
bors Sep 15, 2024
8b2f08c
feat: Add custom completer for `cargo -Z <TAB>`
shannmu Aug 14, 2024
7984efa
Auto merge of #14533 - shannmu:_bin_names, r=epage
bors Sep 16, 2024
654a433
Auto merge of #14534 - shannmu:_cargo_installed_crates, r=epage
bors Sep 16, 2024
75ab4e5
Auto merge of #14536 - shannmu:_cargo_unstable_flags, r=epage
bors Sep 16, 2024
f47e2a5
feat: Add custom completer for completing test names
shannmu Aug 13, 2024
7968f54
feat: Add custom completer for completing target triple
shannmu Aug 13, 2024
10eaf34
Auto merge of #14535 - shannmu:_cargo_target_triple, r=epage
bors Sep 17, 2024
52f8487
Suggest `cargo info` command in the `cargo search` result
Rustin170506 Sep 11, 2024
0ba7540
Use the `shell.note` to print the note
Rustin170506 Sep 17, 2024
32f024f
Auto merge of #14537 - Rustin170506:rustin-patch-suggest-cargo-info, …
bors Sep 17, 2024
25456ea
Auto merge of #14548 - shannmu:_cargo_test_names, r=epage
bors Sep 17, 2024
1eb49a1
Auto merge of #14554 - Rustin170506:rustin-patch-notes, r=epage
bors Sep 17, 2024
9d08d4a
feat: Add custom completer for completing benchmark names
shannmu Aug 13, 2024
60fbfb9
Auto merge of #14532 - shannmu:_cargo_benchmark_names, r=epage
bors Sep 17, 2024
90856d9
fix(complete): Fix problems on my machine
epage Sep 17, 2024
7f44292
Auto merge of #14558 - epage:complete, r=ehuss
bors Sep 18, 2024
1735917
remove reference to incomplete crates.io feature from docs
RalfJung Sep 18, 2024
0461165
Auto merge of #14561 - RalfJung:crates-io-docs, r=weihanglo
bors Sep 18, 2024
78cda34
Revert "remove reference to incomplete crates.io feature from docs"
epage Sep 18, 2024
9101762
docs(unstable): Make sure completion users know of +nightly
epage Sep 18, 2024
9a658f9
docs(unstable): Add completion feedback information
epage Sep 18, 2024
397a180
fix(complete): Fallback to rustc if rustup fails for --target complet…
epage Sep 18, 2024
a5c25f3
fix(complete): Always check rustup for --target
epage Sep 18, 2024
f64411c
feat: Add custom completer for `cargo help <TAB>`
shannmu Aug 14, 2024
13c4c13
feat: Add custom completer for completing example names
shannmu Aug 13, 2024
a6de8c7
Auto merge of #14531 - shannmu:_cargo_example_names, r=epage
bors Sep 18, 2024
cb12afe
Auto merge of #14563 - epage:complete, r=weihanglo
bors Sep 18, 2024
c652c56
Auto merge of #14557 - shannmu:_cargo_cmds, r=epage
bors Sep 18, 2024
f1d3500
Auto merge of #14562 - epage:revert, r=weihanglo
bors Sep 18, 2024
4c38aee
Cleanup duplicated check-cfg lints logic
Urgau Sep 19, 2024
3058f50
Make check_cfg_args fn not-fallible anymore
Urgau Sep 19, 2024
9d5c149
Auto merge of #14567 - Urgau:check-cfg-cleanup-lints, r=epage
bors Sep 19, 2024
fd743da
fix(resolve): Don't list transitive, incompatible dependencies as ava…
epage Sep 19, 2024
5f07992
refactor(ws): Clarify what rust-version is used
epage Sep 19, 2024
698f26b
test(resolver): Have unit test for multi-msrv
epage Sep 19, 2024
6b79647
test(msrv): Clarify version numbers
epage Sep 19, 2024
3a47885
test(msrv): Clarify role of deps
epage Sep 19, 2024
892ad41
test(msrv): Clarify the differences in deps
epage Sep 19, 2024
64abeb2
test(msrv): Show msrv resolver issue
epage Sep 19, 2024
94db932
fix(resolve): Improve multi-MSRV workspaces
epage Sep 19, 2024
eaee77d
Auto merge of #14564 - epage:rustup, r=weihanglo
bors Sep 19, 2024
284b380
test: install without lockfile-path
Ifropc Sep 20, 2024
86a1ff3
feat(complete): Upgrade clap_complete
epage Sep 20, 2024
e0dfa38
Auto merge of #14573 - epage:complete, r=weihanglo
bors Sep 20, 2024
8424b5f
test: add test for install without dry-run option
Flowrey Jul 22, 2024
874a8a0
refactor(compile): Extract test collection
epage Aug 27, 2024
b0e08fc
feat: add --dry-run to install command
Flowrey Jul 22, 2024
6469a3e
Auto merge of #14568 - epage:message, r=weihanglo
bors Sep 21, 2024
d7bffc3
Auto merge of #14280 - Flowrey:dry-run-install, r=weihanglo
bors Sep 21, 2024
373dcc2
feat: Add support for completing `cargo update <TAB>`
shannmu Sep 17, 2024
1b94fb2
chore: Bump MSRV to 1.81
epage Sep 24, 2024
e94fde9
Auto merge of #14585 - epage:msrv-stable, r=ehuss
bors Sep 24, 2024
a6cf1be
test: Switch from allow to expect deprecated
epage Sep 21, 2024
1f5f702
fix(test):; Allow '0 files' to not be redacted
epage Sep 22, 2024
e72ef0b
test: Migrate remaining with_stdout/with_stderr calls
epage Sep 22, 2024
61b8903
chore(test): Bump for breaking changes
epage Sep 22, 2024
7ab9320
fix(test): Remove with_stdout/with_stderr
epage Sep 22, 2024
5e44da4
Auto merge of #14569 - epage:msrv-max, r=weihanglo
bors Sep 24, 2024
844457c
Auto merge of #14577 - epage:tests-basic, r=weihanglo
bors Sep 24, 2024
023f4c6
test: Remove completion tests
epage Sep 24, 2024
975e816
refactor(toml): Indent block in prep for changes
epage Sep 24, 2024
c730621
refactor(toml): Rename is_normalized to are_normalized
epage Sep 24, 2024
fa8fd7f
test(script): Show autolib bug from #14476
epage Sep 24, 2024
da18686
chore(schemas): Bump version
epage Sep 24, 2024
5e35e27
feat(toml): Add `autolib`
epage Sep 24, 2024
90690c5
Auto merge of #14552 - shannmu:_cargo_update_completer, r=epage
bors Sep 24, 2024
f30f909
refactor(resolve): reuse RustVersion construct
weihanglo Sep 24, 2024
2c7bc09
refactor(completions): Pull completer var out
epage Sep 24, 2024
67b664e
fix(complete): Flush completion traces
epage Sep 24, 2024
77e09b1
perf: Trace completion span
epage Sep 24, 2024
f3672cb
test(lockfile): default lockfile version is still v3
weihanglo Sep 24, 2024
5dfdd59
feat: make lockfile v4 the default
weihanglo Sep 24, 2024
8fc3ff4
Auto merge of #14590 - epage:completest-bad, r=weihanglo
bors Sep 25, 2024
ef241af
Auto merge of #14592 - epage:trace-completions, r=weihanglo
bors Sep 25, 2024
cf781da
Auto merge of #14595 - weihanglo:lockfile-v4, r=epage
bors Sep 25, 2024
d5cb6b5
test: Add test for issue-14560
linyihai Sep 23, 2024
7ded268
test(cargo-rustc): show the current precedence
weihanglo Sep 24, 2024
35bb3de
fix(cargo-rustc): give trailing flags higher precedence
weihanglo Sep 24, 2024
01e1ab5
Auto merge of #14587 - weihanglo:cargo-rustc, r=epage
bors Sep 25, 2024
0b83e92
refactor(config): Clarify duplicate-load check
epage Sep 25, 2024
fe917f2
fix(config): Don't double-warn about `$CARGO_HOME/config`
epage Sep 25, 2024
4b81a83
Auto merge of #14579 - linyihai:issue-14560, r=epage
bors Sep 26, 2024
bf37cf7
feat: --lockfile-path add install support
Ifropc Sep 26, 2024
d4ac929
test: add tests for CARGO_MANIFEST_PATH in build.rs
Ifropc Sep 26, 2024
fd63023
timings: use css variables
ahaoboy Sep 26, 2024
3401cb8
timings: add dark mode
ahaoboy Sep 26, 2024
7cbdcf0
Auto merge of #14404 - Ifropc:cargo_manifest_path, r=weihanglo
bors Sep 26, 2024
9d66d13
Auto merge of #14588 - ahaoboy:dark-mode, r=weihanglo
bors Sep 26, 2024
aece1f4
test: refactor resolver test functions
x-hgg-x Sep 24, 2024
c08b437
docs(charter): Declare new Intentional Artifacts as 'small' changes
epage Sep 26, 2024
d199f2e
chore: Bump versions
epage Sep 26, 2024
5c87c14
docs: Declare support level for each crate in our Charter / docs
epage Sep 26, 2024
498ae39
test: relax panic output assertion
weihanglo Sep 26, 2024
43e3fa9
Auto merge of #14602 - weihanglo:rust-122565, r=epage
bors Sep 26, 2024
71c830c
fix: correct error count for `cargo check --message-format json`
yichi170 Sep 27, 2024
a3b35a0
Auto merge of #14598 - yichi170:correct-error-count, r=weihanglo
bors Sep 27, 2024
b396f2c
Auto merge of #14591 - epage:autolib, r=weihanglo
bors Sep 27, 2024
1fad770
Auto merge of #14556 - Ifropc:lockfile-path-install, r=weihanglo
bors Sep 27, 2024
a5503c1
Update cc to1.1.22
ChrisDenton Sep 27, 2024
80d82ca
Auto merge of #14607 - ChrisDenton:cc, r=epage
bors Sep 27, 2024
6f1315b
test: add support for features in the sat resolver
x-hgg-x Sep 24, 2024
9a6a945
refactor: zero-copy deserialization when possible
weihanglo Sep 27, 2024
cdba1c7
refactor: use `RawValue::from_string` for potential perf win
weihanglo Sep 27, 2024
d6b740f
refactor: use Cow on artifact notification
weihanglo Sep 27, 2024
2d368ed
Auto merge of #14583 - x-hgg-x:features-sat-resolver, r=Eh2406
bors Sep 27, 2024
5e2878f
Auto merge of #14608 - weihanglo:deserialize, r=epage
bors Sep 29, 2024
e4e970d
test(freshness): relax compiler panic assertions
weihanglo Sep 28, 2024
b1f574a
test(jobserver): relax compiler panic assertions
weihanglo Sep 28, 2024
8534276
test(build-std): relax compiler panic assertions
weihanglo Sep 28, 2024
3f1b828
test(artifact_dep): relax compiler panic assertions
weihanglo Sep 28, 2024
7cb5be3
test(bench): relax compiler panic assertions
weihanglo Sep 30, 2024
d6ebb14
test(features2): relax compiler panic assertions
weihanglo Sep 30, 2024
e2946ab
test(install): relax compiler panic assertions
weihanglo Sep 30, 2024
c3a74f5
test(rustflags): relax compiler panic assertions
weihanglo Sep 30, 2024
e965b41
test(test): relax compiler panic assertions
weihanglo Sep 30, 2024
dfa8f26
test(test): unnecessay env_remove("RUST_BACKTRACE")
weihanglo Sep 30, 2024
fe50f67
Auto merge of #14618 - weihanglo:relax-more, r=epage
bors Sep 30, 2024
f42831b
docs(ref): Remove duplicate MSRV comment about MSRV
epage Sep 24, 2024
fe70046
docs(ref): Remove reference to interplay of rust-version/edition
epage Sep 24, 2024
f51524c
docs(ref): Fix mistake on how many fields a rust-version must include
epage Sep 24, 2024
d74f02e
docs(ref): Group all functional comments
epage Sep 24, 2024
828c7ef
docs: clarify `target.'cfg(...)'` doesnt respect cfg from build script
weihanglo Jul 26, 2024
dc041a0
Auto merge of #14312 - weihanglo:doc, r=epage
bors Sep 30, 2024
2fd7321
Auto merge of #14619 - epage:msrv-docs, r=weihanglo
bors Sep 30, 2024
a6a2b66
chore(deps): update rust crate unicode-width to 0.2.0
renovate[bot] Oct 1, 2024
96ef4e4
chore(deps): update embarkstudios/cargo-deny-action action to v2
weihanglo Oct 1, 2024
bd31b4a
Auto merge of #14628 - weihanglo:cargo-deny, r=epage
bors Oct 1, 2024
7be5a21
fix: Remove implicit feature removal
epage Oct 1, 2024
6269ab4
docs(config): make `--config <PATH>` more prominent
weihanglo Oct 1, 2024
135ea1c
Auto merge of #14624 - rust-lang:renovate/unicode-width-0.x, r=epage
bors Oct 1, 2024
b4253e5
fix(help): mention `--config <PATH>` in help text
weihanglo Oct 1, 2024
8fdd7f4
Auto merge of #14631 - weihanglo:config-cli, r=epage
bors Oct 1, 2024
fd5f1a0
Auto merge of #14630 - epage:implicit-removal, r=weihanglo
bors Oct 1, 2024
ac3de0b
Auto merge of #14599 - epage:charter, r=weihanglo
bors Oct 1, 2024
0c74d24
chore(deps): update tar to 0.4.42
xzfc Sep 24, 2024
d9c14e6
Auto merge of #14632 - xzfc:tar-0.4.42, r=weihanglo
bors Oct 2, 2024
2652990
Auto merge of #14600 - epage:charter-crates, r=weihanglo
bors Oct 2, 2024
3654e61
Fix `cargo:version_number` - has only one `:`
nyurik Oct 3, 2024
f64f11d
Update src/doc/src/reference/build-script-examples.md
nyurik Oct 3, 2024
8725e78
Auto merge of #14637 - nyurik:patch-1, r=weihanglo
bors Oct 3, 2024
a3eaa4b
docs: Move publishing from ref to guide
epage Sep 30, 2024
1dde071
docs: Move Cache topic from Guide to Reference
epage Sep 30, 2024
3a0236f
docs: Group dep related references
epage Sep 30, 2024
ade52cf
docs(ref): Have msrv-policy feature link to RFC
epage Oct 3, 2024
cb2bcc9
docs(ref): Highleft whats left for msrv-policy
epage Oct 3, 2024
a06986c
Auto merge of #14638 - epage:msrv-feat, r=ehuss
bors Oct 3, 2024
0473ee8
Auto merge of #14620 - epage:guideless, r=weihanglo
bors Oct 3, 2024
1652c3b
docs(ref): Split rust-version into its own chapter
epage Oct 1, 2024
e38e966
docs(ref): Change from rust-version from compilation to support
epage Oct 1, 2024
17ecc17
docs(ref): Expand on uses of Rust version
epage Oct 2, 2024
9ae7533
docs(ref): Set Rust version support expectations
epage Oct 2, 2024
b48e5f1
docs(ref): Step users through MSRV policies
epage Oct 2, 2024
01e138f
chore: Update snapbox
epage Oct 4, 2024
f92e54f
test: Migrate remaining metadata with_json tests to snapbox
epage Aug 16, 2024
c18765a
test: Migrate remaining build with_json tests to snapbox
epage Sep 21, 2024
01a47f3
fix(test): Remove unused, deprecated with_json
epage Sep 22, 2024
c3f19a8
refactor(test): Migrate validate_upload to snapbox for json comparisons
epage Sep 22, 2024
e1179b5
Auto merge of #14636 - epage:msrv-policy, r=weihanglo
bors Oct 4, 2024
ad074ab
Auto merge of #14576 - epage:tests, r=weihanglo
bors Oct 4, 2024
1623c41
improve error reporting when feature not found in activated_features
rukai Dec 2, 2023
ab361f2
Auto merge of #14647 - elchukc:refactor_pkg_activated_features, r=wei…
bors Oct 5, 2024
7a58e6f
chore(deps): bump gix-path from 0.10.9 to 0.10.11
dependabot[bot] Sep 3, 2024
2e309bd
Auto merge of #14489 - rust-lang:dependabot/cargo/gix-path-0.10.10, r…
bors Oct 8, 2024
244578e
fix(complete): Don't complete files for any value
epage Oct 8, 2024
cc4c3e7
test: separate resolver tests into multiple files
x-hgg-x Sep 28, 2024
04e4270
test: add more resolver helper methods
x-hgg-x Sep 29, 2024
870f6d3
test: refactor sat resolver clauses computation
x-hgg-x Sep 29, 2024
dedf251
test: add tests from pubgrub
x-hgg-x Sep 29, 2024
e888c13
test: Add test for issue-14194
linyihai Aug 28, 2024
54dbc2b
fix: Avoid inserting `search_path` again.
linyihai Aug 28, 2024
fbcd9bb
Auto merge of #14464 - linyihai:issue-14194, r=weihanglo
bors Oct 8, 2024
aea3404
Auto merge of #14614 - x-hgg-x:more-sat-resolver-tests, r=Eh2406
bors Oct 8, 2024
9026f95
Auto merge of #14653 - epage:complete, r=ehuss
bors Oct 8, 2024
245cba2
feat: Add custom completer for completing registry name
shannmu Sep 17, 2024
bc2eba1
Document build-plan as being deprecated
ehuss Oct 8, 2024
42a774b
Auto merge of #14657 - ehuss:deprecate-build-plan, r=epage
bors Oct 8, 2024
ac39e69
Auto merge of #14656 - shannmu:_cargo_publish_registry_completer, r=e…
bors Oct 8, 2024
f4ca739
implement checksum freshness fingerprints for cargo
Xaeroxe Jun 19, 2024
0d2e8a5
add bsd 2 clause to allow list for blake3 dep arrayref
Xaeroxe Jul 13, 2024
b9420f8
Add appropriate documentation
Xaeroxe Aug 18, 2024
ad7d33d
test: copy freshness tests in preparation of checksum tests
weihanglo Oct 2, 2024
9b17115
test(freshness_checksum): update test module description
weihanglo Oct 2, 2024
eea5fe9
test(freshness_checksum): remove unnecessary tests
weihanglo Oct 2, 2024
e5a44e2
test(freshness_checksum): requires nightly rustc
weihanglo Oct 2, 2024
74cc1de
test(freshness_checksum): enable -Zfreshness-checksum
weihanglo Oct 2, 2024
b48fe73
test(freshness_checksum): remove unnecessary sleep
weihanglo Oct 2, 2024
66998ea
test(freshness_checksum): verify checksum works
weihanglo Oct 2, 2024
0d08e19
test(freshness_checksum): verify unstable flag is gated correctly
Xaeroxe Oct 3, 2024
c0e550e
test(freshness_checksum): different fingeprint methods are compatible
Xaeroxe Oct 2, 2024
cf893c1
test(freshness_checksum): verify cargo depinfo is properly encoded
Xaeroxe Oct 8, 2024
15fbd2f
Auto merge of #14137 - Xaeroxe:checksum-freshness, r=weihanglo
bors Oct 8, 2024
6019cf4
test(publish): Verify version-exists error in dry-run
epage Oct 29, 2024
d243a22
fix(publish): Downgrade version-exists error to warning on dry-run
epage Oct 29, 2024
5ffbef3
Auto merge of #14744 - epage:publish, r=weihanglo
bors Oct 29, 2024
4a0243d
[SOL] build-std: pull in our compiler-builtins
alessandrod Jun 3, 2022
8bcc583
[SOL] Update compiler builtins to v1.40
LucasSte Feb 6, 2024
89447f6
[SOL] Remove nightly and beta tests
LucasSte Feb 8, 2024
55c6e08
[SOL] Test only with the release version
LucasSte Feb 8, 2024
40da72b
[SOL] Check release bump against the Solana release
LucasSte Feb 12, 2024
ae61230
[SOL] Improve error message for MSRV
acheroncrypto Mar 28, 2024
edd3dc9
[SOL] Adjustments for Rust 1.79 upgrade
LucasSte Jul 22, 2024
c8ef12e
[SOL] 1.83 adjustments
c410-f3r Dec 1, 2024
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
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -173,6 +173,13 @@ jobs:
- run: rustup target add ${{ matrix.other }}
- run: rustup component add rustc-dev llvm-tools-preview rust-docs
if: startsWith(matrix.rust, 'nightly')
# Install fish, zsh, and elvish only on Ubuntu systems
- name: Install fish, zsh, and elvish on Ubuntu
run: sudo apt update -y && sudo apt install fish zsh elvish -y
if: matrix.os == 'ubuntu-latest'
- name: Install fish, elvish on macOS
run: brew install fish elvish
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'
- run: sudo apt update -y && sudo apt install lldb gcc-multilib libsecret-1-0 libsecret-1-dev -y
if: matrix.os == 'ubuntu-latest'
- run: rustup component add rustfmt || echo "rustfmt not available"
@@ -227,6 +234,7 @@ jobs:
- run: rustup update --no-self-update stable && rustup default stable
- run: rustup target add i686-unknown-linux-gnu
- run: sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y
- run: sudo apt update -y && sudo apt install fish zsh elvish -y
- run: rustup component add rustfmt || echo "rustfmt not available"
- run: cargo test -p cargo
env:
629 changes: 406 additions & 223 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -36,7 +36,9 @@ cargo-util = { version = "0.2.14", path = "crates/cargo-util" }
cargo-util-schemas = { version = "0.6.0", path = "crates/cargo-util-schemas" }
cargo_metadata = "0.18.1"
clap = "4.5.11"
clap_complete = { version = "4.5.24", features = ["unstable-dynamic"] }
color-print = "0.3.6"
completest-pty = "0.5.3"
core-foundation = { version = "0.10.0", features = ["mac_os_10_7_support"] }
crates-io = { version = "0.40.4", path = "crates/crates-io" }
criterion = { version = "0.5.1", features = ["html_reports"] }
@@ -153,6 +155,7 @@ cargo-platform.workspace = true
cargo-util-schemas.workspace = true
cargo-util.workspace = true
clap = { workspace = true, features = ["wrap_help"] }
clap_complete.workspace = true
color-print.workspace = true
crates-io.workspace = true
curl = { workspace = true, features = ["http2"] }
@@ -239,6 +242,7 @@ features = [
[dev-dependencies]
annotate-snippets = { workspace = true, features = ["testing-colors"] }
cargo-test-support.workspace = true
completest-pty.workspace = true
gix = { workspace = true, features = ["revision"] }
same-file.workspace = true
snapbox.workspace = true
8 changes: 8 additions & 0 deletions src/bin/cargo/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![allow(clippy::self_named_module_files)] // false positive in `commands/build.rs`

use cargo::core::features;
use cargo::core::shell::Shell;
use cargo::util::network::http::http_handle;
use cargo::util::network::http::needs_custom_http_transport;
@@ -28,6 +29,13 @@ fn main() {
}
};

let nightly_features_allowed = matches!(&*features::channel(), "nightly" | "dev");
if nightly_features_allowed {
clap_complete::CompleteEnv::with_factory(|| cli::cli(&mut gctx))
.var("CARGO_COMPLETE")
.complete();
}

let result = if let Some(lock_addr) = cargo::ops::fix_get_proxy_lock_addr() {
cargo::ops::fix_exec_rustc(&gctx, &lock_addr).map_err(|e| CliError::from(e))
} else {
25 changes: 25 additions & 0 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
@@ -117,6 +117,7 @@ Each new feature described below should explain how to use it.
* [script](#script) --- Enable support for single-file `.rs` packages.
* [lockfile-path](#lockfile-path) --- Allows to specify a path to lockfile other than the default path `<workspace_root>/Cargo.lock`.
* [package-workspace](#package-workspace) --- Allows for packaging and publishing multiple crates in a workspace.
* [native-completions](#native-completions) --- Move cargo shell completions to native completions.

## allow-features

@@ -1686,6 +1687,30 @@ cargo +nightly -Zpackage-workspace --registry=my-registry package -p foo -p dep
cargo +nightly -Zpackage-workspace --index=https://example.com package -p foo -p dep
```

## native-completions
* Original Issue: [#6645](https://github.com/rust-lang/cargo/issues/6645)
* Tracking Issue: [#14520](https://github.com/rust-lang/cargo/issues/14520)

This feature moves the handwritten completion scripts to Rust native, making it
easier for us to add, extend and test new completions. This feature is enabled with the
nightly channel, without requiring additional `-Z` options.

### How to use native-completions feature:
- bash:
Add `source <(CARGO_COMPLETE=bash cargo)` to your .bashrc.

- zsh:
Add `source <(CARGO_COMPLETE=zsh cargo)` to your .zshrc.

- fish:
Add `source (CARGO_COMPLETE=fish cargo | psub)` to `$XDG_CONFIG_HOME/fish/completions/cargo.fish`

- elvish:
Add `eval (E:CARGO_COMPLETE=elvish cargo | slurp)` to `$XDG_CONFIG_HOME/elvish/rc.elv`

- powershell:
Add `CARGO_COMPLETE=powershell cargo | Invoke-Expression` to `$PROFILE`.

# Stabilized and removed features

## Compile progress
1 change: 1 addition & 0 deletions tests/testsuite/main.rs
Original file line number Diff line number Diff line change
@@ -166,6 +166,7 @@ mod rustflags;
mod rustup;
mod script;
mod search;
mod shell_completions;
mod shell_quoting;
mod source_replacement;
mod ssh;
200 changes: 200 additions & 0 deletions tests/testsuite/shell_completions.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
#![cfg(unix)]

use cargo_test_support::cargo_test;
use completest_pty::Runtime;
use snapbox::assert_data_eq;

#[cargo_test]
fn bash() {
// HACK: At least on CI, bash is not working on macOS
if cfg!(target_os = "macos") {
return;
}

let input = "cargo \t\t";
let expected = snapbox::str![
"%
--version --help check install read-manifest update
--list -V clean locate-project remove vendor
--explain -v config login report verify-project
--verbose -q doc logout run version
--quiet -C fetch metadata rustc yank
--color -Z fix new rustdoc
--locked -h generate-lockfile owner search
--offline add help package test
--frozen bench info pkgid tree
--config build init publish uninstall "
];
let actual = complete(input, "bash");
assert_data_eq!(actual, expected);
}

#[cargo_test]
fn elvish() {
// HACK: At least on CI, elvish is not working on macOS
if cfg!(target_os = "macos") {
return;
}

let input = "cargo \t\t";
let expected = snapbox::str![
"% cargo --config
COMPLETING argument
--color --version check install read-manifest update
--config -C clean locate-project remove vendor
--explain -V config login report verify-project
--frozen -Z doc logout run version
--help -h fetch metadata rustc yank
--list -q fix new rustdoc
--locked -v generate-lockfile owner search
--offline add help package test
--quiet bench info pkgid tree
--verbose build init publish uninstall "
];
let actual = complete(input, "elvish");
assert_data_eq!(actual, expected);
}

#[cargo_test]
fn fish() {
// HACK: At least on CI, fish is not working on macOS
if cfg!(target_os = "macos") {
return;
}

let input = "cargo \t\t";
let expected = snapbox::str![
"% cargo
--version (Print version info and exit)
--list (List installed commands)
--explain (Provide a detailed explanation of a rustc error message)
--verbose (Use verbose output (-vv very verbose/build.rs output))
--quiet (Do not print cargo log messages)
--color (Coloring: auto, always, never)
--locked (Assert that `Cargo.lock` will remain unchanged)
--offline (Run without accessing the network)
--frozen (Equivalent to specifying both --locked and --offline)
--config (Override a configuration value)
--help (Print help)
-V (Print version info and exit)
-v (Use verbose output (-vv very verbose/build.rs output))
-q (Do not print cargo log messages)
-C (Change to DIRECTORY before doing anything (nightly-only))
-Z (Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details)
-h (Print help)
add (Add dependencies to a Cargo.toml manifest file)
bench (Execute all benchmarks of a local package)
build (Compile a local package and all of its dependencies)
check (Check a local package and all of its dependencies for errors)
clean (Remove artifacts that cargo has generated in the past)
config (Inspect configuration values)
doc (Build a package's documentation)
fetch (Fetch dependencies of a package from the network)
fix (Automatically fix lint warnings reported by rustc)
generate-lockfile (Generate the lockfile for a package)
help (Displays help for a cargo subcommand)
info (Display information about a package in the registry)
init (Create a new cargo package in an existing directory)
install (Install a Rust binary)
locate-project (Print a JSON representation of a Cargo.toml file's location)
login (Log in to a registry.)
logout (Remove an API token from the registry locally)
metadata (Output the resolved dependencies of a package, the concrete used versions including overrides, in machine-r…)
new (Create a new cargo package at <path>)
owner (Manage the owners of a crate on the registry)
package (Assemble the local package into a distributable tarball)
pkgid (Print a fully qualified package specification)
publish (Upload a package to the registry)
read-manifest (Print a JSON representation of a Cargo.toml manifest.)
remove (Remove dependencies from a Cargo.toml manifest file)
report (Generate and display various kinds of reports)
run (Run a binary or example of the local package)
rustc (Compile a package, and pass extra options to the compiler)
rustdoc (Build a package's documentation, using specified custom flags.)
search (Search packages in the registry. Default registry is crates.io)
test (Execute all unit and integration tests and build examples of a local package)
tree (Display a tree visualization of a dependency graph)
uninstall (Remove a Rust binary)
update (Update dependencies as recorded in the local lock file)
vendor (Vendor all dependencies for a project locally)
verify-project (Check correctness of crate manifest)
version (Show version information)
yank (Remove a pushed crate from the index)"];

let actual = complete(input, "fish");
assert_data_eq!(actual, expected);
}

#[cargo_test]
fn zsh() {
let input = "cargo \t\t";
let expected = snapbox::str![
"% cargo
--color --version check install read-manifest update
--config -C clean locate-project remove vendor
--explain -V config login report verify-project
--frozen -Z doc logout run version
--help -h fetch metadata rustc yank
--list -q fix new rustdoc
--locked -v generate-lockfile owner search
--offline add help package test
--quiet bench info pkgid tree
--verbose build init publish uninstall "
];
let actual = complete(input, "zsh");
assert_data_eq!(actual, expected);
}

fn complete(input: &str, shell: &str) -> String {
let shell = shell.into();

// Load the runtime
let mut runtime = match shell {
"bash" => load_runtime::<completest_pty::BashRuntimeBuilder>("bash"),
"elvish" => load_runtime::<completest_pty::ElvishRuntimeBuilder>("elvish"),
"fish" => load_runtime::<completest_pty::FishRuntimeBuilder>("fish"),
"zsh" => load_runtime::<completest_pty::ZshRuntimeBuilder>("zsh"),
_ => panic!("Unsupported shell: {}", shell),
};

// Exec the completion
let term = completest_pty::Term::new();
let actual = runtime.complete(input, &term).unwrap();

actual
}

// Return the scratch directory to keep it not being dropped
fn load_runtime<R: completest_pty::RuntimeBuilder>(shell: &str) -> Box<dyn completest_pty::Runtime>
where
<R as completest_pty::RuntimeBuilder>::Runtime: 'static,
{
let home = cargo_test_support::paths::home();

let bin_path = cargo_test_support::cargo_exe();
let bin_root = bin_path.parent().unwrap().to_owned();

let mut runtime = Box::new(R::new(bin_root, home).unwrap());

match shell {
"bash" => runtime
.register("", "source <(CARGO_COMPLETE=bash cargo)")
.unwrap(),
"elvish" => runtime
.register("", "eval (E:CARGO_COMPLETE=elvish cargo | slurp)")
.unwrap(),
"fish" => runtime
.register("cargo", "source (CARGO_COMPLETE=fish cargo | psub)")
.unwrap(),
"zsh" => runtime
.register(
"cargo",
"#compdef cargo
source <(CARGO_COMPLETE=zsh cargo)",
)
.unwrap(),
_ => panic!("Unsupported shell: {}", shell),
}

runtime
}