Cross-target clippy (check rs_cross) is a quarter of each local check

Open
#10,420 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
ci-cd, testing

Research direction

Start by reading sh/rs/cross-lint.sh and the just check and just ci definitions to see how rs_cross runs and where --all-targets is set. Compare the two options in the issue against the native nightly lanes and landing worker gate; done means choosing and implementing a scope change that reduces local check time while documenting where cross-target test errors will be caught.

Written by the indexing model from the issue text.

Description

quest

Problem

Over 7 hours of agent work on one 32-core host, just check and just ci in moq worktrees used 33 core-hours across 81 runs, a mean of about 25 CPU-minutes per run. The wall and CPU seconds per module summaries from 45 of those runs split it like this:

Phase Share of CPU Mean CPU-min per run
test rs 40% 12.2
check rs_cross 23% 6.6
check rs 17.5% 5.0
check js 6% 3.1
  • rs_cross's local narrowing to "selected crates that name a platform" saves little: it averaged 7.7 CPU-min under just check and 6.1 under just ci.
  • In sampled clippy-driver processes, test targets (--test) made up about 79% of cross-target clippy time (1.81 of 2.29 core-hours). Libs and bins made up the other 21%.

Options

  • Drop --all-targets from sh/rs/cross-lint.sh. macOS and Windows would lint libs, bins and examples, and leave test targets to the nightly native lanes. That cuts about three quarters of the phase, roughly 15% of every check.
  • Or run rs_cross only in the landing worker's gate, not in a local just check.

Either way, a platform-gated error in a test target would surface later: in the nightly native lanes with the first option, or in the queue with the second.

(Written by Claude Opus 5.5 with high effort)

Dominant language
Rust
Stars
1.6k
Forks
251
Avg merge
10h 10m
Merged PRs (30d)
822

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 moq-dev/moq

All issues in moq-dev/moq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.