Open
Description
When switching between git trees where one contains clippy as a submodule and one contains clippy in tree, x.py fails to initialize the submodule correctly in some cases, resulting in a failed build. For example:
git clone https://github.com/jethrogb/rust/ -b clippy-submodule
cd rust
./x.py help
git checkout -f clippy-tree
./x.py help
git checkout -f -
./x.py help
error: failed to read `/tmp/rust/src/tools/clippy/Cargo.toml`
Caused by:
No such file or directory (os error 2)
failed to run: /tmp/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /tmp/rust/src/bootstrap/Cargo.toml
Full output: xpy-clippy.txt
/tmp/rust/src/tools/clippy/Cargo.toml
should be in the clippy submodule but it's not checked out correctly. If I do git reset --hard
inside the submodule, it works fine.
related #63964
@rustbot modify labels +A-rustbuild