rust-lang / rust-lang/rust

Compiler unit tests are never run in CI

Open
#148,266 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I tried this code on a checkout branched from f5e2df741b4a9820a7579f0c8eccc951706a8782:

$ x test compiler/rustc_parse_format

I expected to see this happen: No warnings.

Instead, this happened:

Testing stage1 {rustc_parse_format} (aarch64-apple-darwin)
   Compiling rustc_index v0.0.0 (/Users/jyn/src/rust-upstream/compiler/rustc_index)
warning: extern crate `smallvec` is unused in crate `rustc_index`
 --> compiler/rustc_index/src/lib.rs:2:1
  |
2 | #![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
  | ^
  |
  = help: remove the dependency or add `use smallvec as _;` to the crate root
  = note: requested on the command line with `-W unused-crate-dependencies`

This in itself isn't a big deal, but it seems bad that we aren't running tests that would have caught this ... I spot-checked the logs for the latest bors merge (https://github.com/rust-lang/rust/actions/runs/18907890296/job/53970647517) and couldn't find rustc_parse_format anywhere in them.

Contributor guide

Open the contributing guide

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.

Research direction

Start with the reported x test compiler/rustc_parse_format invocation and inspect the linked GitHub Actions bors-merge logs for how compiler unit tests are selected. Trace the CI test selection around compiler/rustc_parse_format and verify why it is absent. Done means the test is exercised in CI and the relevant warning or failure is covered by the resulting run.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ci-cd, compilers, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.