Cargo runtime package discovery panics for cargo run unit graphs

Open
#3,082 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
build-system

Research direction

Start with runtime_profile.rs::discovery_args and the reported cargo/src/ops/cargo_run.rs:95:5 assertion. Reproduce the unit-graph behavior with the pinned nightly, then check how graph-only selectors behave for run/r, including the selector and argument cases listed in the issue. Done means a real Cargo integration witness covers those cases while the producer gate and managed compilation behavior remain intact.

Written by the indexing model from the issue text.

Description

Observed in ngspice-rs-preprocess serial validation job 207 (#167), nightly-2026-11-26. Workspace/all-target and native reference tests passed, then the managed launcher failed before executing the first example. Diagnostic: Cargo runtime dependency discovery failed; cargo/src/ops/cargo_run.rs:95:5 assertion left 0 right 1. The source verifier calls cargo run --config --locked -p model-translate-simplis --example logic_ngspice -- . runtime_profile.rs::discovery_args keeps the run subcommand and appends -Zunstable-options --unit-graph; Cargo run expects an actual built executable, but unit graph mode returns none. Qualify equivalent graph-only selectors for run/r, including explicit bin/example, implicit default-run, single-bin and ambiguous multi-bin cases, feature/target/config selectors and arguments after --. Do not silently broaden the active package closure, bypass managed compilation or change downstream tests. Add a real Cargo integration witness on pinned nightly. The producer gate must remain intact.

Dominant language
Rust
Stars
8k
Forks
835
Avg merge
3d 6h
Merged PRs (30d)
60

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/sccache

All issues in mozilla/sccache

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.