Skip to content

Commit 19d3071

Browse files
committed
fix(package): Fix lookups to capitalized workspace member's index entry
1 parent f5ec77b commit 19d3071

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/cargo/ops/cargo_package/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,8 @@ impl<'a> TmpRegistry<'a> {
10681068
v: Some(2),
10691069
})?;
10701070

1071-
let file = cargo_util::registry::make_dep_path(package.name().as_str(), false);
1071+
let file =
1072+
cargo_util::registry::make_dep_path(&package.name().as_str().to_lowercase(), false);
10721073
let mut dst = self.index_path().open_rw_exclusive_create(
10731074
file,
10741075
self.gctx,

tests/testsuite/package.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -6478,19 +6478,13 @@ fn workspace_with_capitalized_member() {
64786478
p.cargo("package -Zpackage-workspace --no-verify")
64796479
.masquerade_as_nightly_cargo(&["package-workspace"])
64806480
.replace_crates_io(reg.index_url())
6481-
.with_status(101)
64826481
.with_stderr_data(
64836482
str![[r#"
64846483
[PACKAGING] main v0.0.1 ([ROOT]/foo/main)
64856484
[UPDATING] crates.io index
64866485
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
64876486
[PACKAGING] DEP v0.1.0 ([ROOT]/foo/dep)
6488-
[ERROR] failed to prepare local package for uploading
6489-
6490-
Caused by:
6491-
no matching package named `DEP` found
6492-
location searched: crates.io index
6493-
required by package `main v0.0.1 ([ROOT]/foo/main)`
6487+
[PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
64946488
64956489
"#]]
64966490
.unordered(),

0 commit comments

Comments
 (0)