Skip to content

Commit

Permalink
Auto merge of rust-lang#114027 - arlosi:update-cargo, r=ehuss
Browse files Browse the repository at this point in the history
Update cargo

8 commits in 1b15556767f4b78a64e868eedf4073c423f02b93..7ac9416d82cd4fc5e707c9ec3574d22dff6466e5
2023-07-18 14:44:47 +0000 to 2023-07-24 14:29:38 +0000
- fix(cargo-credential): should enable feature `serde/derive` (rust-lang/cargo#12396)
- fix: encode URL params correctly for SourceId in Cargo.lock (rust-lang/cargo#12280)
- docs: format config override caveat as a note (rust-lang/cargo#12392)
- credential provider implementation (rust-lang/cargo#12334)
- feat(crates-io): expose HTTP headers and Error type (rust-lang/cargo#12310)
- chore: Don't update test data (rust-lang/cargo#12380)
- fix: only skip mtime check on `~/.cargo/{git,registry}` (rust-lang/cargo#12369)
- Update docs for artifact JSON debuginfo levels. (rust-lang/cargo#12376)

Since rust-lang/cargo#12334 makes built-in credential providers part of the cargo binary, it's no longer needed to build them in bootstrap.
  • Loading branch information
bors committed Jul 25, 2023
2 parents 18fa7b9 + ecfac68 commit 864bdf7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 50 deletions.
7 changes: 0 additions & 7 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,13 +1085,6 @@ impl Step for Cargo {
tarball.add_dir(etc.join("man"), "share/man/man1");
tarball.add_legal_and_readme_to("share/doc/cargo");

for dirent in fs::read_dir(cargo.parent().unwrap()).expect("read_dir") {
let dirent = dirent.expect("read dir entry");
if dirent.file_name().to_str().expect("utf8").starts_with("cargo-credential-") {
tarball.add_file(&dirent.path(), "libexec", 0o755);
}
}

Some(tarball.generate())
}
}
Expand Down
9 changes: 0 additions & 9 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,19 +894,10 @@ tool_doc!(
"-p",
"cargo-credential",
"-p",
"cargo-credential-1password",
"-p",
"mdman",
// FIXME: this trips a license check in tidy.
// "-p",
// "resolver-tests",
// FIXME: we should probably document these, but they're different per-platform so we can't use `tool_doc`.
// "-p",
// "cargo-credential-gnome-secret",
// "-p",
// "cargo-credential-macos-keychain",
// "-p",
// "cargo-credential-wincred",
]
);
tool_doc!(Tidy, "tidy", "src/tools/tidy", rustc_tool = false, ["-p", "tidy"]);
Expand Down
33 changes: 0 additions & 33 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,39 +558,6 @@ impl Step for Cargo {
allow_features: "",
})
.expect("expected to build -- essential tool");

let build_cred = |name, path| {
// These credential helpers are currently experimental.
// Any build failures will be ignored.
let _ = builder.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
tool: name,
mode: Mode::ToolRustc,
path,
is_optional_tool: true,
source_type: SourceType::Submodule,
extra_features: Vec::new(),
allow_features: "",
});
};

if self.target.contains("windows") {
build_cred(
"cargo-credential-wincred",
"src/tools/cargo/credential/cargo-credential-wincred",
);
}
if self.target.contains("apple-darwin") {
build_cred(
"cargo-credential-macos-keychain",
"src/tools/cargo/credential/cargo-credential-macos-keychain",
);
}
build_cred(
"cargo-credential-1password",
"src/tools/cargo/credential/cargo-credential-1password",
);
cargo_bin_path
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/cargo
Submodule cargo updated 61 files
+3 −0 .github/renovate.json5
+16 −7 Cargo.lock
+11 −3 Cargo.toml
+1 −0 crates/cargo-test-support/src/compare.rs
+36 −0 crates/cargo-test-support/src/registry.rs
+2 −2 crates/crates-io/Cargo.toml
+79 −88 crates/crates-io/lib.rs
+1 −1 credential/cargo-credential-1password/Cargo.toml
+66 −72 credential/cargo-credential-1password/src/lib.rs
+1 −1 credential/cargo-credential-gnome-secret/Cargo.toml
+102 −86 credential/cargo-credential-gnome-secret/src/libsecret.rs
+1 −1 credential/cargo-credential-macos-keychain/Cargo.toml
+87 −0 credential/cargo-credential-macos-keychain/src/lib.rs
+0 −58 credential/cargo-credential-macos-keychain/src/main.rs
+1 −1 credential/cargo-credential-wincred/Cargo.toml
+128 −0 credential/cargo-credential-wincred/src/lib.rs
+0 −122 credential/cargo-credential-wincred/src/main.rs
+4 −1 credential/cargo-credential/Cargo.toml
+1 −1 credential/cargo-credential/README.md
+275 −67 credential/cargo-credential/src/lib.rs
+101 −0 credential/cargo-credential/src/secret.rs
+1 −26 src/bin/cargo/commands/login.rs
+1 −1 src/bin/cargo/commands/owner.rs
+1 −1 src/bin/cargo/commands/yank.rs
+18 −5 src/cargo/core/compiler/fingerprint/mod.rs
+2 −4 src/cargo/core/package.rs
+93 −11 src/cargo/core/resolver/encode.rs
+2 −0 src/cargo/core/resolver/resolve.rs
+64 −8 src/cargo/core/source/source_id.rs
+17 −124 src/cargo/ops/registry/login.rs
+0 −26 src/cargo/ops/registry/logout.rs
+10 −8 src/cargo/ops/registry/mod.rs
+4 −4 src/cargo/ops/registry/owner.rs
+8 −6 src/cargo/ops/registry/publish.rs
+4 −4 src/cargo/ops/registry/yank.rs
+4 −1 src/cargo/sources/git/source.rs
+8 −1 src/cargo/sources/registry/download.rs
+20 −12 src/cargo/sources/registry/http_remote.rs
+0 −156 src/cargo/util/auth/asymmetric.rs
+342 −482 src/cargo/util/auth/mod.rs
+8 −11 src/cargo/util/config/mod.rs
+24 −1 src/cargo/util/config/path.rs
+71 −0 src/cargo/util/credential/adaptor.rs
+8 −0 src/cargo/util/credential/mod.rs
+216 −0 src/cargo/util/credential/paseto.rs
+79 −0 src/cargo/util/credential/process.rs
+100 −0 src/cargo/util/credential/token.rs
+13 −2 src/cargo/util/errors.rs
+1 −0 src/cargo/util/mod.rs
+5 −1 src/cargo/util/toml_mut/dependency.rs
+2 −1 src/doc/src/reference/external-tools.md
+3 −3 src/doc/src/reference/overriding-dependencies.md
+181 −80 src/doc/src/reference/unstable.md
+318 −254 tests/testsuite/credential_process.rs
+61 −1 tests/testsuite/freshness.rs
+195 −0 tests/testsuite/lockfile_compat.rs
+34 −132 tests/testsuite/login.rs
+4 −4 tests/testsuite/owner.rs
+5 −5 tests/testsuite/publish.rs
+3 −93 tests/testsuite/registry_auth.rs
+4 −4 tests/testsuite/yank.rs

0 comments on commit 864bdf7

Please sign in to comment.