refactor(toml): extract dependency-to-source-id to function#13802
Merged
bors merged 6 commits intorust-lang:masterfrom Apr 25, 2024
Merged
refactor(toml): extract dependency-to-source-id to function#13802bors merged 6 commits intorust-lang:masterfrom
bors merged 6 commits intorust-lang:masterfrom
Conversation
Collaborator
epage
reviewed
Apr 25, 2024
src/cargo/util/toml/mod.rs
Outdated
| Ok(dep) | ||
| } | ||
|
|
||
| fn resolve_source_id_from_dependency<P: ResolveToPath + Clone>( |
Contributor
There was a problem hiding this comment.
Naming wise, resolve is generally being used in this file to "resolve" the original toml to a resolved toml.
For taking toml content and generating a cargo-native type, the to_ naming scheme is used. So this could be to_source_id or to_dependency_source_id.
Member
Author
There was a problem hiding this comment.
Fixed. Thanks for the suggestion!
epage
reviewed
Apr 25, 2024
| ) { | ||
| (Some(_git), _, Some(_registry), _) | (Some(_git), _, _, Some(_registry)) => bail!( | ||
| "dependency ({}) specification is ambiguous. \ | ||
| "dependency ({name_in_toml}) specification is ambiguous. \ |
Contributor
There was a problem hiding this comment.
aside: isn't there a clippy lint we could turn on for this?
Member
Author
There was a problem hiding this comment.
Yes, but not sure if we want to turn it on for every place. For here it seems fine.
Contributor
|
@bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 26, 2024
Update cargo 9 commits in c9392675917adc2edab269eea27c222b5359c637..b60a1555155111e962018007a6d0ef85207db463 2024-04-23 19:35:19 +0000 to 2024-04-26 16:37:29 +0000 - fix(toml): Remove underscore field support in 2024 (rust-lang/cargo#13804) - fix: emit 1.77 syntax error only when msrv is incompatible (rust-lang/cargo#13808) - docs(ref): Index differences between virtual / real manifests (rust-lang/cargo#13794) - refactor(toml): extract dependency-to-source-id to function (rust-lang/cargo#13802) - Add where lint was set (rust-lang/cargo#13801) - fix(toml): Don't double-warn when underscore is used in workspace dep (rust-lang/cargo#13800) - fix(toml): Be more forceful with underscore/dash redundancy (rust-lang/cargo#13798) - Fix warning suppression for config.toml vs config compat symlinks (rust-lang/cargo#13793) - Cleanup linting system (rust-lang/cargo#13797) r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 27, 2024
Update cargo 9 commits in c9392675917adc2edab269eea27c222b5359c637..b60a1555155111e962018007a6d0ef85207db463 2024-04-23 19:35:19 +0000 to 2024-04-26 16:37:29 +0000 - fix(toml): Remove underscore field support in 2024 (rust-lang/cargo#13804) - fix: emit 1.77 syntax error only when msrv is incompatible (rust-lang/cargo#13808) - docs(ref): Index differences between virtual / real manifests (rust-lang/cargo#13794) - refactor(toml): extract dependency-to-source-id to function (rust-lang/cargo#13802) - Add where lint was set (rust-lang/cargo#13801) - fix(toml): Don't double-warn when underscore is used in workspace dep (rust-lang/cargo#13800) - fix(toml): Be more forceful with underscore/dash redundancy (rust-lang/cargo#13798) - Fix warning suppression for config.toml vs config compat symlinks (rust-lang/cargo#13793) - Cleanup linting system (rust-lang/cargo#13797) r? ghost
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Miscellaneous refactors around extracting dependency-to-source-id to a function.
This is a side effect when trying to rebase #13779.
How should we test and review this PR?
Should be more readable IMO?
Additional information