-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(add): Clarify which version the features are added for #11075
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This optimization doesn't really make a difference and it makes it harder to separate UI / edit concerns.
This gives a hint to users that we might not be showing the feature list for the latest version but the earliest version. Also when using a workspace dependency or re-using an existing dependency, this is a good reminder of what the version requirement is that was selected. However, when the user or add (the common case) selected a full precision requirement, this is redundant. I'm also mixed on whether the meta version should show up. Fixes rust-lang#11073
This will only show the messaeg if we didn't already show a version req with full precision specified ... mostly. We'll also skip it if its a local or git dependency but we never show the version in those cases because it doesn't matter. The `precise_version` logic came from cargo-upgrade.
r? @weihanglo (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 12, 2022
Muscraft
reviewed
Sep 13, 2022
weihanglo
reviewed
Sep 13, 2022
weihanglo
approved these changes
Sep 13, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am good with this. Thank you!
@Muscraft do you have any other suggestion?
Muscraft
approved these changes
Sep 13, 2022
@bors r+ |
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
Sep 13, 2022
☀️ Test successful - checks-actions |
weihanglo
added a commit
to weihanglo/rust
that referenced
this pull request
Sep 13, 2022
10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000 - Take priority into account within the pending queue (rust-lang/cargo#11032) - fix(add): Clarify which version the features are added for (rust-lang/cargo#11075) - doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079) - Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023) - Don't use `for` loop on an `Option` (rust-lang/cargo#11081) - Remove dead code (rust-lang/cargo#11080) - Change progress indicator for sparse registries (rust-lang/cargo#11068) - chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055) - Cache index files based on contents hash (rust-lang/cargo#11044) - fix: specifies the max length for crate name (rust-lang/cargo#11051)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 13, 2022
Update cargo 10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000 - Take priority into account within the pending queue (rust-lang/cargo#11032) - fix(add): Clarify which version the features are added for (rust-lang/cargo#11075) - doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079) - Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023) - Don't use `for` loop on an `Option` (rust-lang/cargo#11081) - Remove dead code (rust-lang/cargo#11080) - Change progress indicator for sparse registries (rust-lang/cargo#11068) - chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055) - Cache index files based on contents hash (rust-lang/cargo#11044) - fix: specifies the max length for crate name (rust-lang/cargo#11051)
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 20, 2024
Update cargo 10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000 - Take priority into account within the pending queue (rust-lang/cargo#11032) - fix(add): Clarify which version the features are added for (rust-lang/cargo#11075) - doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079) - Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023) - Don't use `for` loop on an `Option` (rust-lang/cargo#11081) - Remove dead code (rust-lang/cargo#11080) - Change progress indicator for sparse registries (rust-lang/cargo#11068) - chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055) - Cache index files based on contents hash (rust-lang/cargo#11044) - fix: specifies the max length for crate name (rust-lang/cargo#11051)
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
Update cargo 10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000 - Take priority into account within the pending queue (rust-lang/cargo#11032) - fix(add): Clarify which version the features are added for (rust-lang/cargo#11075) - doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079) - Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023) - Don't use `for` loop on an `Option` (rust-lang/cargo#11081) - Remove dead code (rust-lang/cargo#11080) - Change progress indicator for sparse registries (rust-lang/cargo#11068) - chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055) - Cache index files based on contents hash (rust-lang/cargo#11044) - fix: specifies the max length for crate name (rust-lang/cargo#11051)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Command-add
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
This gives a hint to users that we might not be showing the feature list
for the latest version but the earliest version.
Also when using a workspace dependency, this is a good reminder of what the version requirement is that was selected. That could also be useful for reused dependencies but didn't want to bother with the relevant plumbing for that.
ie we are going from
to
How should we test and review this PR?
I'd recommend looking at this commit-by-commit. This is broken up into several refactors leading up the main change. The refactors are focused on pulling UI logic out of dependency editing so we can more easily evolve the UI without breaking the editing API. I then tweaked the behavior in the final commit to be less redundant / noisy.
The existing tests are used to demonstrate this is working.
Additional information
I'm also mixed on whether the meta version should show up.
Fixes #11073