fix(package): Fix lookups to capitalized workspace member's index entry #15216
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.lock
and verifying. We must firstto_lowercase
the 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_path
is shared between the index and.crate
files which are handled differently (and sharing of theto_lowercase
would be nice). Maybe if made amake_index_path
that had an assert and calledmake_dep_path
. I held off on that for now.How should we test and review this PR?
Additional information