Skip to content

Commit

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

4 commits in d274fcf862b89264fa2c6b917b15230705257317..a3c2627fbc2f5391c65ba45ab53b81bf71fa323c
2020-12-07 23:08:44 +0000 to 2020-12-14 17:21:26 +0000
- Check if rerun-if-changed points to a directory. (rust-lang/cargo#8973)
- Implement external credential process. (RFC 2730) (rust-lang/cargo#8934)
- Revert recent build-std vendoring changes (rust-lang/cargo#8968)
- Fix the unit dependency graph with dev-dependency `links` (rust-lang/cargo#8969)
  • Loading branch information
bors committed Dec 18, 2020
2 parents e4297ba + 74498c1 commit f745834
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 7 deletions.
60 changes: 56 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,35 @@ dependencies = [
"winapi 0.3.9",
]

[[package]]
name = "cargo-credential"
version = "0.1.0"

[[package]]
name = "cargo-credential-1password"
version = "0.1.0"
dependencies = [
"cargo-credential",
"serde",
"serde_json",
]

[[package]]
name = "cargo-credential-macos-keychain"
version = "0.1.0"
dependencies = [
"cargo-credential",
"security-framework",
]

[[package]]
name = "cargo-credential-wincred"
version = "0.1.0"
dependencies = [
"cargo-credential",
"winapi 0.3.9",
]

[[package]]
name = "cargo-miri"
version = "0.1.0"
Expand Down Expand Up @@ -4442,6 +4471,29 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"

[[package]]
name = "security-framework"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69"
dependencies = [
"bitflags",
"core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
]

[[package]]
name = "security-framework-sys"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b"
dependencies = [
"core-foundation-sys",
"libc",
]

[[package]]
name = "semver"
version = "0.9.0"
Expand Down Expand Up @@ -4489,18 +4541,18 @@ dependencies = [

[[package]]
name = "serde"
version = "1.0.115"
version = "1.0.118"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5"
checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
dependencies = [
"serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.115"
version = "1.0.118"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48"
checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
dependencies = [
"proc-macro2",
"quote",
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ members = [
"src/tools/rust-installer",
"src/tools/rust-demangler",
"src/tools/cargo",
"src/tools/cargo/crates/credential/cargo-credential-1password",
"src/tools/cargo/crates/credential/cargo-credential-macos-keychain",
"src/tools/cargo/crates/credential/cargo-credential-wincred",
"src/tools/rustdoc",
"src/tools/rls",
"src/tools/rustfmt",
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,12 @@ impl Step for Cargo {
builder.create_dir(&image.join("etc/bash_completion.d"));
let cargo = builder.ensure(tool::Cargo { compiler, target });
builder.install(&cargo, &image.join("bin"), 0o755);
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-") {
builder.install(&dirent.path(), &image.join("libexec"), 0o755);
}
}
for man in t!(etc.join("man").read_dir()) {
let man = t!(man);
builder.install(&man.path(), &image.join("share/man/man1"), 0o644);
Expand Down
37 changes: 35 additions & 2 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ impl Step for Cargo {
}

fn run(self, builder: &Builder<'_>) -> PathBuf {
builder
let cargo_bin_path = builder
.ensure(ToolBuild {
compiler: self.compiler,
target: self.target,
Expand All @@ -574,7 +574,40 @@ impl Step for Cargo {
source_type: SourceType::Submodule,
extra_features: Vec::new(),
})
.expect("expected to build -- essential tool")
.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(),
});
};

if self.target.contains("windows") {
build_cred(
"cargo-credential-wincred",
"src/tools/cargo/crates/credential/cargo-credential-wincred",
);
}
if self.target.contains("apple-darwin") {
build_cred(
"cargo-credential-macos-keychain",
"src/tools/cargo/crates/credential/cargo-credential-macos-keychain",
);
}
build_cred(
"cargo-credential-1password",
"src/tools/cargo/crates/credential/cargo-credential-1password",
);
cargo_bin_path
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/tools/cargo
Submodule cargo updated 47 files
+14 −7 .github/workflows/main.yml
+4 −0 crates/cargo-test-support/src/lib.rs
+17 −4 crates/cargo-test-support/src/paths.rs
+8 −0 crates/credential/README.md
+13 −0 crates/credential/cargo-credential-1password/Cargo.toml
+323 −0 crates/credential/cargo-credential-1password/src/main.rs
+14 −0 crates/credential/cargo-credential-gnome-secret/Cargo.toml
+3 −0 crates/credential/cargo-credential-gnome-secret/build.rs
+210 −0 crates/credential/cargo-credential-gnome-secret/src/main.rs
+12 −0 crates/credential/cargo-credential-macos-keychain/Cargo.toml
+50 −0 crates/credential/cargo-credential-macos-keychain/src/main.rs
+12 −0 crates/credential/cargo-credential-wincred/Cargo.toml
+99 −0 crates/credential/cargo-credential-wincred/src/main.rs
+10 −0 crates/credential/cargo-credential/Cargo.toml
+41 −0 crates/credential/cargo-credential/README.md
+86 −0 crates/credential/cargo-credential/src/lib.rs
+42 −0 src/bin/cargo/commands/logout.rs
+3 −0 src/bin/cargo/commands/mod.rs
+1 −1 src/cargo/core/compiler/fingerprint.rs
+18 −39 src/cargo/core/compiler/standard_lib.rs
+12 −2 src/cargo/core/compiler/unit_dependencies.rs
+2 −0 src/cargo/core/features.rs
+2 −2 src/cargo/ops/mod.rs
+126 −57 src/cargo/ops/registry.rs
+236 −0 src/cargo/ops/registry/auth.rs
+53 −26 src/cargo/util/config/mod.rs
+81 −0 src/cargo/util/paths.rs
+7 −10 src/doc/src/reference/build-scripts.md
+176 −0 src/doc/src/reference/unstable.md
+126 −2 tests/testsuite/build_script.rs
+488 −0 tests/testsuite/credential_process.rs
+82 −0 tests/testsuite/logout.rs
+2 −0 tests/testsuite/main.rs
+0 −1 tests/testsuite/mock-std/library/test/Cargo.toml
+0 −1 tests/testsuite/mock-std/library/test/src/lib.rs
+0 −9 tests/testsuite/mock-std/vendor/registry-dep-only-used-by-test/Cargo.toml
+0 −2 tests/testsuite/mock-std/vendor/registry-dep-only-used-by-test/src/lib.rs
+0 −12 tests/testsuite/mock-std/vendor/registry-dep-using-alloc/Cargo.toml
+0 −9 tests/testsuite/mock-std/vendor/registry-dep-using-alloc/src/lib.rs
+0 −11 tests/testsuite/mock-std/vendor/registry-dep-using-core/Cargo.toml
+0 −8 tests/testsuite/mock-std/vendor/registry-dep-using-core/src/lib.rs
+0 −11 tests/testsuite/mock-std/vendor/registry-dep-using-std/Cargo.toml
+0 −8 tests/testsuite/mock-std/vendor/registry-dep-using-std/src/lib.rs
+0 −1 tests/testsuite/mock-std/vendor/rustc-std-workspace-alloc/Cargo.toml
+0 −1 tests/testsuite/mock-std/vendor/rustc-std-workspace-core/Cargo.toml
+0 −1 tests/testsuite/mock-std/vendor/rustc-std-workspace-std/Cargo.toml
+57 −84 tests/testsuite/standard_lib.rs

0 comments on commit f745834

Please sign in to comment.