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(update): Include a Locking message #13759

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Apr 15, 2024

What does this PR try to resolve?

This extends #13561 to cargo update. I previously left it out because the locking message was redundant. However the Locking message has been extended in #13754 to include the resolving policy which can be a useful point of interest (e.g. "why does cargo update do nothing? Oh, -Zminimal-versions is enabled").

I still left out the message for --precise because the user is overriding all of that.

I'd still like to extend all of this to cargo install (and maybe all resolves) but that is taking more investigation.

How should we test and review this PR?

Additional information

We aren't locking to latest.
We could customize the message for precise but it seemed a bit
excessive.
@rustbot
Copy link
Collaborator

rustbot commented Apr 15, 2024

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added Command-generate-lockfile S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2024
tests/testsuite/git.rs Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which can be a useful point of interest (e.g. "why does cargo update do nothing? Oh, -Zminimal-versions is enabled").

I can't connect the current locking message to this. It basically prints zero without any explanation. How does it help user figure out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will print

[LOCKING] 0 packages to earliest compatible versions

minimal versions, in its current form, is an odd example as its on the command line. When MSRV becomes the default, it will be "holding things back" and we want to give the users hints as to why it might be.

@weihanglo
Copy link
Member

Thanks for the clarification!

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

📌 Commit bec36fc has been approved by weihanglo

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 Apr 16, 2024
@bors
Copy link
Collaborator

bors commented Apr 16, 2024

⌛ Testing commit bec36fc with merge b9d913e...

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing b9d913e to master...

@bors bors merged commit b9d913e into rust-lang:master Apr 16, 2024
21 checks passed
@epage epage deleted the more-lock branch April 16, 2024 12:12
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2024
Update cargo

11 commits in 48eca1b164695022295ce466b64b44e4e0228b08..6f06fe908a5ee0f415c187f868ea627e82efe07d
2024-04-12 21:16:36 +0000 to 2024-04-16 18:47:44 +0000
- fix(toml): Error on `[project]` in Edition 2024 (rust-lang/cargo#13747)
- feat(update): Include a Locking message (rust-lang/cargo#13759)
- chore(deps): update rust crate gix to 0.62.0 [security] (rust-lang/cargo#13760)
- test(schemas): Ensure tests cover the correct case (rust-lang/cargo#13761)
- feat(resolve): Tell the user the style of resovle done (rust-lang/cargo#13754)
- Make sure to also wrap the initial `-vV` invocation (rust-lang/cargo#13659)
- docs: update `checkout` GitHub action version (rust-lang/cargo#13757)
- Recategorize cargo test's `--doc` flag under "Target Selection" (rust-lang/cargo#13756)
- Reword sentence describing workspace toml for clarity (rust-lang/cargo#13753)
- docs(ref): Update unstable docs for msrv-policy (rust-lang/cargo#13751)
- refactor(config): Consistently use kebab-case (rust-lang/cargo#13748)

r? ghost
@rustbot rustbot added this to the 1.79.0 milestone Apr 17, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Apr 17, 2024
Update cargo

11 commits in 48eca1b164695022295ce466b64b44e4e0228b08..6f06fe908a5ee0f415c187f868ea627e82efe07d
2024-04-12 21:16:36 +0000 to 2024-04-16 18:47:44 +0000
- fix(toml): Error on `[project]` in Edition 2024 (rust-lang/cargo#13747)
- feat(update): Include a Locking message (rust-lang/cargo#13759)
- chore(deps): update rust crate gix to 0.62.0 [security] (rust-lang/cargo#13760)
- test(schemas): Ensure tests cover the correct case (rust-lang/cargo#13761)
- feat(resolve): Tell the user the style of resovle done (rust-lang/cargo#13754)
- Make sure to also wrap the initial `-vV` invocation (rust-lang/cargo#13659)
- docs: update `checkout` GitHub action version (rust-lang/cargo#13757)
- Recategorize cargo test's `--doc` flag under "Target Selection" (rust-lang/cargo#13756)
- Reword sentence describing workspace toml for clarity (rust-lang/cargo#13753)
- docs(ref): Update unstable docs for msrv-policy (rust-lang/cargo#13751)
- refactor(config): Consistently use kebab-case (rust-lang/cargo#13748)

r? ghost
bors added a commit that referenced this pull request Apr 17, 2024
feat(install): Including Locking message

### What does this PR try to resolve?

This extends #13561 to include `cargo install`, like #13759 did for `cargo update`.

As we switch to MSRV-aware resolver, this will help users work out why
MSRV-aware resolving isn't helping them.

This will also make it more obvious if we breaking things when
developing the MSRV-aware resolver.

### How should we test and review this PR?

### Additional information

This still leaves `cargo publish` and a couple other misc situations that I'm intentionally avoiding because
- They hit some weird cases that can confuse the user (e.g. causing `cargo install --locked` to show that 1 package is being added) and we can't distinguish these cases too well from where this is happening
- The value is lower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-generate-lockfile 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.

4 participants