Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,10 @@ jobs:
if: needs.changes.outputs.rust == 'true'
run: cargo xtask manifest --check

- name: First-party crate dependency edges are within the allowlist
if: needs.changes.outputs.rust == 'true'
run: cargo xtask check-crate-edges

# Surface the cache hit rate for the clippy compile so the effect is visible
# in the logs, on the local-only path too — see build-and-test for why this
# is gated on sccache being present rather than on the remote backend being
Expand Down
15 changes: 3 additions & 12 deletions xtask/src/affected.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,9 @@ struct Node {
/// `--locked` mirrors [`crate::manifest`]: use the committed `Cargo.lock`
/// exactly rather than letting metadata resolve to newer registry versions.
pub fn load_graph() -> Result<Graph> {
let output = Command::new(std::env::var_os("CARGO").unwrap_or_else(|| "cargo".into()))
.args(["metadata", "--format-version", "1", "--locked"])
.output()
.context("failed to run `cargo metadata`")?;
if !output.status.success() {
bail!(
"`cargo metadata` failed: {}",
String::from_utf8_lossy(&output.stderr).trim()
);
}
let metadata: Metadata = serde_json::from_slice(&output.stdout)
.context("failed to parse `cargo metadata` output")?;
let stdout = crate::paths::run_cargo_metadata(&[])?;
let metadata: Metadata =
serde_json::from_slice(&stdout).context("failed to parse `cargo metadata` output")?;
let graph = build_graph(&metadata);
// A member at the repository root would have an empty source dir and so own
// every changed file, silently defeating the conservative full-workspace
Expand Down
Loading
Loading