-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
tidy tries to run unrelated x
binary
#106469
Comments
Hmm, that's unfortunate, I didn't realize this was a name that was already being used :( cc @DebugSteven, we might have to revert that PR :/ @ehuss would it be ok if we only ran your |
x
binary
x
binaryx
binary
We can probably check that the binary is in ~/.cargo/bin or so before running it, at least. We can probably also add a custom section to it or other content that we can find without running it (e.g., by reading the contents and looking for a well known version). I seem to recall cargo tracking installed versions too, maybe we can lean on that? |
Oh, that's an excellent idea! yes,
and we can only run A debug section seems slightly overkill but I'm not opposed if you think |
I think my point is that if we're diligent about bumping the cargo.toml version we don't ever need to run it, just look at Cargo output. |
I think for me it might be OK to ignore any errors running the command or any parsing errors on the output.
Opening the executable and searching for a unique sequence of bytes that precedes the version number is also an option, but possibly a bit of a hassle. (Or it could look for some unique string that identifies it as the x.py wrapper, and then execute it.) Any option is fine, and there's no urgency here unless it affects other people. |
I really don't like the idea of just running a arbitrary binary, even if it appears in Perhaps the check can be moved into bootstrap (or anywhere out of tidy) so that it can know its version without running binaries? IMO, tidy is more about linting code; it shouldn't emit an error if a user has an old version of an optional and unessential tool. |
…er-x, r=jyn514 Revert "warn newer available version of the x tool" Reverts rust-lang#104552 Running the x executable directly created an [issue](rust-lang#106469) here. There are other options for warning a user that a newer version of x exists in the issue's discussion as well. r? `@jyn514`
…er-x, r=jyn514 Revert "warn newer available version of the x tool" Reverts rust-lang#104552 Running the x executable directly created an [issue](rust-lang#106469) here. There are other options for warning a user that a newer version of x exists in the issue's discussion as well. r? ``@jyn514``
…=albertlarsan68 check for x version updates This PR adds a check to tidy to assert that the installed version of `x` is equal to the version in `src/tools/x/Cargo.toml`. It checks the installed version of `x` by parsing the output of `cargo install --list` (as an option proposed in this [issue](rust-lang#106469)). It does not warn if `x` has not yet been installed, on the assumption that the user isn't interested in using it.
This was fixed in #107048 :) |
Starting with #104552,
./x.py test tidy
fails on my system:I have an executable installed on my system called
x
that is unrelated to rust. I would prefer if tidy didn't execute it at all.The text was updated successfully, but these errors were encountered: