Skip to content
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

x.py tidy doesn't ignore untracked files #75582

Open
arora-aman opened this issue Aug 16, 2020 · 5 comments
Open

x.py tidy doesn't ignore untracked files #75582

arora-aman opened this issue Aug 16, 2020 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@arora-aman
Copy link
Member

arora-aman commented Aug 16, 2020

Tidy exists as an external tool that x.py calls, and it has a fixed set of paths that it ignores. Which is unlike other x.py commands which ignore untracked files.

This causes problems when some of the ignored paths get moved. eg: as part of 2c31b45 src/stdarch was moved to library/stdarch.

Error log
tidy error: /users/a52arora/rust/src/stdarch/ci/android-install-ndk.sh:2: copyright notices attributed to the Rust Project Developers are deprecated
tidy error: /users/a52arora/rust/src/stdarch/ci/android-install-sdk.sh:2: copyright notices attributed to the Rust Project Developers are deprecated
tidy error: /users/a52arora/rust/src/stdarch/ci/android-install-sdk.sh:49: line longer than 100 chars
tidy error: /users/a52arora/rust/src/stdarch/ci/android-sysimage.sh:3: copyright notices attributed to the Rust Project Developers are deprecated
tidy error: /users/a52arora/rust/src/stdarch/ci/run.sh:29: tab character
tidy error: /users/a52arora/rust/src/stdarch/ci/run.sh:30: tab character

On one hand I appreciate this, because it tells me to go remove files that aren't required anymore. But on the otherhand I usually run tests in a detached screen session only to come find tests didn't run because of tidy error due to moved submodules.

I'd prefer if the untracked files were ignored and instead at the end of the build log I got a warning saying "Tidy error in untracked directory/file" or someother way of letting me know that a submodule was moved and I should clean up.

@LeSeulArtichaut LeSeulArtichaut added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Aug 16, 2020
@Mark-Simulacrum
Copy link
Member

I would be unopposed to not checking untracked files in tidy, and would accept a PR doing so.

Note that you can also run those long-running tests with --exclude src/tools/tidy which should avoid this problem for the time being.

@ollie27
Copy link
Member

ollie27 commented Aug 16, 2020

I would be unopposed to not checking untracked files in tidy, and would accept a PR doing so.

It would be a bit inconvenient to always have to git add new files before running tidy. I usually run tidy first.

@Mark-Simulacrum
Copy link
Member

Tidy would still pass though? Just wouldn't give you all the errors, potentially.

@ollie27
Copy link
Member

ollie27 commented Aug 17, 2020

Tidy would still pass though? Just wouldn't give you all the errors, potentially.

The purpose of tidy is to catch errors so if it misses some that's a problem.

@jyn514
Copy link
Member

jyn514 commented Nov 10, 2020

@ollie27 would you be ok with opting-in to check untracked files, maybe in config.toml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants