From 230f37d066ba4e82fb6a174387aa9ac91c0846b6 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 10 Feb 2026 15:55:29 -0600 Subject: [PATCH 01/14] fix(script): Adjust casing of error message --- src/cargo/core/source_id.rs | 2 +- tests/testsuite/script/cargo.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/source_id.rs b/src/cargo/core/source_id.rs index 3db37d2184d..df958bf133d 100644 --- a/src/cargo/core/source_id.rs +++ b/src/cargo/core/source_id.rs @@ -405,7 +405,7 @@ impl SourceId { .to_file_path() .expect("path sources cannot be remote"); if crate::util::toml::is_embedded(&path) { - anyhow::bail!("Single file packages cannot be used as dependencies") + anyhow::bail!("single file packages cannot be used as dependencies") } Ok(Box::new(PathSource::new(&path, self, gctx))) } diff --git a/tests/testsuite/script/cargo.rs b/tests/testsuite/script/cargo.rs index 39a907a7f83..97c38c2f66c 100644 --- a/tests/testsuite/script/cargo.rs +++ b/tests/testsuite/script/cargo.rs @@ -2012,7 +2012,7 @@ Caused by: Unable to update [ROOT]/foo/script.rs Caused by: - Single file packages cannot be used as dependencies + single file packages cannot be used as dependencies "#]]) .run(); From 5ba08a53ed0f40ebc8a039c6ee531a2959a35cd0 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 10 Feb 2026 15:59:37 -0600 Subject: [PATCH 02/14] fix(registry): Adjust casing of error message --- src/cargo/core/registry.rs | 4 ++-- tests/testsuite/bad_config.rs | 14 +++++++------- .../cargo_add/invalid_path/stderr.term.svg | 6 +++--- tests/testsuite/cargo_features.rs | 2 +- tests/testsuite/directory.rs | 2 +- tests/testsuite/git.rs | 10 +++++----- tests/testsuite/git_auth.rs | 12 ++++++------ tests/testsuite/https.rs | 2 +- tests/testsuite/local_registry.rs | 2 +- tests/testsuite/offline.rs | 2 +- tests/testsuite/patch.rs | 2 +- tests/testsuite/path.rs | 6 +++--- tests/testsuite/replace.rs | 2 +- tests/testsuite/script/cargo.rs | 2 +- tests/testsuite/ssh.rs | 14 +++++++------- tests/testsuite/workspaces.rs | 2 +- 16 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs index 030b3e72ca7..99f1d857ac0 100644 --- a/src/cargo/core/registry.rs +++ b/src/cargo/core/registry.rs @@ -542,7 +542,7 @@ impl<'gctx> PackageRegistry<'gctx> { let source = self .source_config .load(source_id, &self.yanked_whitelist) - .with_context(|| format!("Unable to update {}", source_id))?; + .with_context(|| format!("unable to update {}", source_id))?; assert_eq!(source.source_id(), source_id); if kind == Kind::Override { @@ -812,7 +812,7 @@ impl<'gctx> Registry for PackageRegistry<'gctx> { for (source_id, source) in self.sources.sources_mut() { source .block_until_ready() - .with_context(|| format!("Unable to update {}", source_id))?; + .with_context(|| format!("unable to update {}", source_id))?; } Ok(()) } diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index 81d7312871c..f66da6bf3f9 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -455,7 +455,7 @@ Caused by: failed to load source for dependency `foo` Caused by: - Unable to update git://host.xz + unable to update git://host.xz Caused by: failed to clone into: [ROOT]/home/.cargo/git/db/_empty-[HASH] @@ -476,7 +476,7 @@ Caused by: failed to load source for dependency `foo` Caused by: - Unable to update file:/// + unable to update file:/// Caused by: failed to clone into: [ROOT]/home/.cargo/git/db/_empty-[HASH] @@ -2338,7 +2338,7 @@ Caused by: failed to load source for dependency `bar` Caused by: - Unable to update https://github.com/rust-lang/does-not-exist/pull/123 + unable to update https://github.com/rust-lang/does-not-exist/pull/123 ... [NOTE] GitHub url https://github.com/rust-lang/does-not-exist/pull/123 is not a repository. [HELP] Replace the dependency with @@ -2383,7 +2383,7 @@ Caused by: failed to load source for dependency `bar` Caused by: - Unable to update http://127.0.0.1/#foo + unable to update http://127.0.0.1/#foo Caused by: failed to clone into: [ROOT]/home/.cargo/git/db/_empty-[HASH] @@ -2445,7 +2445,7 @@ Caused by: failed to load source for dependency `bar` Caused by: - Unable to update registry `crates-io` + unable to update registry `crates-io` Caused by: could not find a configured source with the name `bar` when attempting to lookup `crates-io` (configuration in `[ROOT]/foo/.cargo/config.toml`) @@ -2490,7 +2490,7 @@ Caused by: failed to load source for dependency `bar` Caused by: - Unable to update registry `crates-io` + unable to update registry `crates-io` Caused by: detected a cycle of `replace-with` sources, the source `crates-io` is eventually replaced with itself (configuration in `[ROOT]/foo/.cargo/config.toml`) @@ -2538,7 +2538,7 @@ Caused by: failed to load source for dependency `bar` Caused by: - Unable to update registry `crates-io` + unable to update registry `crates-io` Caused by: detected a cycle of `replace-with` sources, the source `crates-io` is eventually replaced with itself (configuration in `[ROOT]/foo/.cargo/config.toml`) diff --git a/tests/testsuite/cargo_add/invalid_path/stderr.term.svg b/tests/testsuite/cargo_add/invalid_path/stderr.term.svg index 7a97e8811b9..203ba67dc93 100644 --- a/tests/testsuite/cargo_add/invalid_path/stderr.term.svg +++ b/tests/testsuite/cargo_add/invalid_path/stderr.term.svg @@ -1,7 +1,7 @@ - +