Skip to content

Commit

Permalink
fix(package): Fix lookups to capitalized workspace member's index entry
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Feb 21, 2025
1 parent eff4cae commit 3b03612
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/cargo/ops/cargo_package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,8 @@ impl<'a> TmpRegistry<'a> {
v: Some(2),
})?;

let file = cargo_util::registry::make_dep_path(package.name().as_str(), false);
let file =
cargo_util::registry::make_dep_path(&package.name().as_str().to_lowercase(), false);
let mut dst = self.index_path().open_rw_exclusive_create(
file,
self.gctx,
Expand Down
8 changes: 1 addition & 7 deletions tests/testsuite/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6478,19 +6478,13 @@ fn workspace_with_capitalized_member() {
p.cargo("package -Zpackage-workspace --no-verify")
.masquerade_as_nightly_cargo(&["package-workspace"])
.replace_crates_io(reg.index_url())
.with_status(101)
.with_stderr_data(
str![[r#"
[PACKAGING] main v0.0.1 ([ROOT]/foo/main)
[UPDATING] crates.io index
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
[PACKAGING] DEP v0.1.0 ([ROOT]/foo/dep)
[ERROR] failed to prepare local package for uploading
Caused by:
no matching package named `DEP` found
location searched: crates.io index
required by package `main v0.0.1 ([ROOT]/foo/main)`
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
"#]]
.unordered(),
Expand Down

0 comments on commit 3b03612

Please # to comment.