fix(package): Fix lookups to capitalized workspace member's index entry#15216
Merged
weihanglo merged 3 commits intorust-lang:masterfrom Feb 21, 2025
Merged
fix(package): Fix lookups to capitalized workspace member's index entry#15216weihanglo merged 3 commits intorust-lang:masterfrom
weihanglo merged 3 commits intorust-lang:masterfrom
Conversation
For index entries, the caller must lowercase the name.
Collaborator
|
r? @weihanglo rustbot has assigned @weihanglo. Use |
weihanglo
approved these changes
Feb 21, 2025
| /// | ||
| /// <div class="warning"> | ||
| /// | ||
| /// Note: For index files, `dep_name` must have had `to_lowercase` called on it. |
Member
There was a problem hiding this comment.
To be frank, I don't know why we have chosen to lower the case for index file queries. Apart from that, this looks good.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 22, 2025
Update cargo 16 commits in ce948f4616e3d4277e30c75c8bb01e094910df39..1d1d646c06a84c1aa53967b394b7f1218f85db82 2025-02-14 20:32:07 +0000 to 2025-02-21 21:38:53 +0000 - fix(package): Fix lookups to capitalized workspace member's index entry (rust-lang/cargo#15216) - chore(ci): Visually group output in Github (rust-lang/cargo#15218) - chore(ci): Auto-update cargo-semver-checks (rust-lang/cargo#15212) - chore(deps): update msrv (3 versions) to v1.83 (rust-lang/cargo#15217) - docs(ref): Shift focus to resolver v3 (rust-lang/cargo#15213) - fix: mention "3" as a valid value for "resolver" field in error message (rust-lang/cargo#15215) - chore(deps): update msrv (1 version) to v1.85 (rust-lang/cargo#15211) - fix: build warning in windows_reserved_names_are_allowed (rust-lang/cargo#15206) - Typo: "togother" -> "together" (rust-lang/cargo#15204) - chore: bump to 0.88.0; update changelog (rust-lang/cargo#15202) - Typo: "explicitally" -> "explicitly" (rust-lang/cargo#15201) - fix(add): Focus on error, rather than large feature lists (rust-lang/cargo#15200) - docs: Improve comments (rust-lang/cargo#15197) - fix(embedded): Handle more parsing corner cases (rust-lang/cargo#15187) - docs: docs for `-Zfeature-unification` (rust-lang/cargo#15189) - Fix man page with malformed `{{#options}}` block (rust-lang/cargo#15191)
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?
When investigating a report of a package-rename bug in
-Zpackage-workspace, I found that we weren't correctly naming the file for index entries for generatingCargo.lockand verifying. We must firstto_lowercasethe name.In fixing this, I also tried to clarify the API to reduce the chance of this happening in the future. Still not great that the caller is expected to handle this and know about it. The problem is
make_dep_pathis shared between the index and.cratefiles which are handled differently (and sharing of theto_lowercasewould be nice). Maybe if made amake_index_paththat had an assert and calledmake_dep_path. I held off on that for now.How should we test and review this PR?
Additional information