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

feat(cargo-update): --precise to allow yanked versions #13333

Merged
merged 7 commits into from
Jan 29, 2024

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

Address #4225

Supports specifying yanked versions via the --precise flag of cargo update.
This is still behind -Zunstable-options nightly flag.

How should we test and review this PR?

Review this commit by commit.

As Jacob mentioned in #4225 (comment), only indexes in registry sources can be yanked. None of git source, path source, directory source can. It should be pretty safe not checking sources.

The other thing needing a review is the warning. It is pretty slim at this moment, but a big warning can be added if we want to scare people away from using yanked versions 👻.

Additional information

@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2024

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation A-registries Area: registries A-semver Area: semver specifications, version matching, etc. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2024
@Eh2406
Copy link
Contributor

Eh2406 commented Jan 21, 2024

Leaving open for feedback on how to emit the warning. But r=me when ready.

@Eh2406
Copy link
Contributor

Eh2406 commented Jan 29, 2024

Looks good to me, fix the typo and merge.

tests/testsuite/update.rs Outdated Show resolved Hide resolved
src/doc/man/cargo-update.md Outdated Show resolved Hide resolved
src/doc/man/cargo-update.md Outdated Show resolved Hide resolved
src/doc/man/cargo-update.md Outdated Show resolved Hide resolved
@epage
Copy link
Contributor

epage commented Jan 29, 2024

(no need to wait on me to approve fixes for any of my comments)

@weihanglo
Copy link
Member Author

Addressed all the wording suggestions. Thanks!

@bors r=Eh2406

@bors
Copy link
Contributor

bors commented Jan 29, 2024

📌 Commit caeaaa5 has been approved by Eh2406

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 29, 2024
@bors
Copy link
Contributor

bors commented Jan 29, 2024

⌛ Testing commit caeaaa5 with merge 3e1a2dd...

@bors
Copy link
Contributor

bors commented Jan 29, 2024

☀️ Test successful - checks-actions
Approved by: Eh2406
Pushing 3e1a2dd to master...

@bors bors merged commit 3e1a2dd into rust-lang:master Jan 29, 2024
20 checks passed
@weihanglo weihanglo deleted the precise-yank branch January 29, 2024 21:57
@ehuss
Copy link
Contributor

ehuss commented Feb 4, 2024

Is #4225 intended to be the tracking issue for this?

@weihanglo
Copy link
Member Author

Is #4225 intended to be the tracking issue for this?

Sort of? I expect a relatively short unstable period then we merge it. I am not sure if everybody is happy about insta-stable.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2024
Update cargo

24 commits in 7bb7b539558dc88bea44cee4168b6269bf8177b0..cdf84b69d0416c57ac9dc3459af80dfb4883d27a
2024-01-20 00:15:32 +0000 to 2024-02-02 19:39:16 +0000
- Apply `-Zpanic-abort-tests` to doctests too (rust-lang/cargo#13388)
- Don't print rustdoc command lines on failure by default (rust-lang/cargo#13387)
- Ensure `nonzero_exit_code` test isn't affected by developers `RUST_BACKTRACE` setting (rust-lang/cargo#13385)
- Add `docsrs` cfg as a well known `--check-cfg` (rust-lang/cargo#13383)
- fix(new): Print a note, rather than a comment, for more information (rust-lang/cargo#13371)
- Change tests to support changes to suggestion (rust-lang/cargo#13382)
- chore(ci): enable m1 runner (rust-lang/cargo#13377)
- fix(toml): Improve map/sequence error message (rust-lang/cargo#13376)
- fix(diagnostic): Don't panic on empty spans (rust-lang/cargo#13375)
- doc: Hide `cargo-fetch` description in offline man page (rust-lang/cargo#13364)
- feat: stabilize lockfile v4 (rust-lang/cargo#12852)
- fix(new): Print a 'Creating', rather than 'Created' status (rust-lang/cargo#13367)
- fix: use spec id instead of name to match package (rust-lang/cargo#13335)
- refactor(shell): Use new fancy anstyle API (rust-lang/cargo#13368)
- feat(cargo-update): `--precise` to allow yanked versions (rust-lang/cargo#13333)
- refactor: remove unnecessary Option in `Freshness::Dirty` (rust-lang/cargo#13361)
- doc: Replace version with `latest` for jobserver link (rust-lang/cargo#13366)
- test: data layout fix for `x86_64-unknown-none-gnu` (rust-lang/cargo#13362)
- docs(ref): Try to improve reg auth docs (rust-lang/cargo#13351)
- fix typo of rustbuild, instead of rustuild (rust-lang/cargo#13357)
- fix(config): Deprecate non-extension files (rust-lang/cargo#13349)
- fix(cli): Improve errors related to cargo script (rust-lang/cargo#13346)
- fix list option description starting with uppercase (rust-lang/cargo#13344)
- Fix typo in test (rust-lang/cargo#13342)
@epage
Copy link
Contributor

epage commented Feb 5, 2024

I don't see us learning much from this being unstable and am good with having an FCP on this now.

@epage
Copy link
Contributor

epage commented Feb 5, 2024

The only change I can see maybe eventually doing is making yanked versions candidates but making them the lowest priority. So long as we don't close the door on that which I don't think this change does, I'm good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation A-registries Area: registries A-semver Area: semver specifications, version matching, etc. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants