rust-lang / rust-lang/rust

tidy `triagebot.toml` `trigger_files` fails on `jj git clone` unchecked out submodules

Open
#139,856 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-contributor-roadblock A-tidy C-external-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Summary

After jj git clone, tidy's triagebot.toml trigger_files path check can fail on paths pointing to or under unchecked out submodules as jj git clone doesn't currently create empty dirs for unchecked out submodules as jj's submodule support isn't complete yet.

Command used
$ jj git clone git@github.com:rust-lang/rust.git
$ ./x test tidy
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.05s
Building stage0 tool tidy (x86_64-unknown-linux-gnu)
   Compiling tidy v0.1.0 (/home/wffl/prog/rust-r/src/tools/tidy)
    Finished `release` profile [optimized + debuginfo] target(s) in 1.81s
fmt check
fmt: checked 5937 modified files
hint: if this number seems too high, try running `git fetch origin master`
tidy check
tidy error: triagebot.toml [mentions.*] contains path 'src/tools/cargo' which doesn't exist
tidy error: triagebot.toml [mentions.*] contains path 'src/tools/enzyme' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/book' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/edition-guide' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/embedded-book' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/nomicon' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/reference' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/doc/rust-by-example' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/llvm-project' which doesn't exist
tidy error: triagebot.toml [assign.owners] contains path 'src/tools/cargo' which doesn't exist
tidy error: triagebot.toml [autolabel.F-autodiff] contains trigger_files path 'src/tools/enzyme' which doesn't exist
some tidy checks failed
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:00:05
Expected behaviour

Tidy should skip checks on paths within submodules if they are not checked out locally (but do full check in CI).

Actual behaviour

Fails locally on jj git clone.

Bootstrap configuration (bootstrap.toml)

Default

Operating system

Any

HEAD

f3344ef4bd57ac7609b40f1da75d685032e965f1, or any commit after the tidy triagebot.toml trigger_files path check was introduced.

Additional context

These path checks in src/tools/tidy/src/triagebot.rs https://github.com/rust-lang/rust/blob/58c2dd9a54a325f4ce96f70332ceb07a3b58f0e5/src/tools/tidy/src/triagebot.rs#L24-L30

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 in src/tools/tidy/src/triagebot.rs at the path checks referenced by the issue, and reproduce the failure with jj git clone followed by ./x test tidy. The work is done when unchecked-out submodule paths are skipped locally while the checks still run fully in CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.