rust-lang / rust-lang/rust-clippy

Add a feature to enable/disable external crates in uitests

Open
#8,206 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-infra C-an-interesting-project E-medium
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Description

In #8179 two new dependencies for our UI-tests have been added, futures and tokio. This increases the pipeline runtime by about 3 minutes. The additional time is mostly spent on compiling, from what I can tell. For local tests, I would like to have external crates like these disabled by default and only enable them if I actually develop on related lints and in the pipeline.

This is how I imagine it:

cargo uitest

This runs all tests which only require Clippy. uitests with external crates are ignored on this case

cargo uitest --features=external-dependencies

Runs all uitest, including those that need external dependencies. This would be the default option in the pipeline

Version

No response

Additional Labels

cc: @flip1995 you're our CI wizard 🧙. Maybe you have some thoughts on the matter 🙃

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 by locating the cargo uitest entry point and the pipeline configuration that runs UI tests, then find how the futures and tokio-dependent tests are identified. Verify the two command forms: the default skips tests requiring external crates, while --features=external-dependencies runs all UI tests and remains the pipeline behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.