Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jieyouxu opened this issue Apr 15, 2025 · 3 comments
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust A-tidy Area: The tidy tool C-external-bug Category: issue that is caused by bugs in software beyond our control T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Apr 15, 2025

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 [email protected]: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

f3344ef, 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

if !full_path.exists() {
tidy_error!(
bad,
"triagebot.toml [mentions.*] contains path '{}' which doesn't exist",
clean_path
);
}

@jieyouxu jieyouxu added A-tidy Area: The tidy tool C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 15, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 15, 2025
@jieyouxu jieyouxu added A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 15, 2025
@jieyouxu jieyouxu self-assigned this Apr 15, 2025
@jieyouxu jieyouxu changed the title tidy triagebot.toml trigger_files fails on unchecked out submodules tidy triagebot.toml trigger_files fails on jj git clone unchecked out submodules Apr 15, 2025
@jieyouxu jieyouxu removed their assignment Apr 15, 2025
@jieyouxu
Copy link
Member Author

Note: after jj git clone, git submodules update --init --recursive can still be used to ask git to create the submodules dirs which should unblock further tidy checks.

@jieyouxu jieyouxu added C-external-bug Category: issue that is caused by bugs in software beyond our control and removed C-bug Category: This is a bug. labels Apr 15, 2025
@jieyouxu
Copy link
Member Author

Maybe tidy could try to simply create placeholder submodule dirs if they don't already exist, but also jj isn't a configuration that we test...

@bjorn3
Copy link
Member

bjorn3 commented Apr 15, 2025

I feel like jj should be fixed to create the placeholder submodule dirs even if it doesn't have any other submodule support. It needs to handle submodule reference objects anyway. Handling them as creating the directory in question shouldn't be much harder than handling them as if the tree entry for the submodule reference doesn't exist at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust A-tidy Area: The tidy tool C-external-bug Category: issue that is caused by bugs in software beyond our control T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
3 participants