-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove workspace and fix dogfood (again) #6802
Conversation
r? @llogiq (rust-highfive has picked a reviewer for you, use r? to override) |
This reverts commit 1e7b1cc.
@bors r+ |
📌 Commit d71ed26 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Uff, reverting this broke lintcheck again :( |
Hmm how can that be? |
I'm not really sure yet. rust-clippy/clippy_dev/src/lib.rs Line 361 in abd2c7e
|
I've fixed the issue by redoing one of my commits but I still have no idea what caused this 🤷 😄 |
With this change, the dogfood test doesn't actually run. 🤔 |
I found the reason. If something is a (path) dep and not a workspace member, cargo will run $ cd clippy_workspace_tests/subcrate
$ echo "$(head -n -2 ../Cargo.toml)" > ../Cargo.toml # remove `workspace` from crate
$ ../../target/debug/cargo-clippy clippy -v
Checking path_dep v0.1.0 (/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/path_dep)
!!! Running `rustc --crate-name path_dep /home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/path_dep/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=bdbed90518da5aa3 -C extra-filename=-bdbed90518da5aa3 --out-dir /home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/deps -C incremental=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/incremental -L dependency=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/deps -Zunstable-options`
Checking subcrate v0.1.0 (/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate)
Running `/home/pkrones/rust-lang/rust-clippy/target/debug/clippy-driver rustc --crate-name subcrate src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=4bb424f3a7cef4f6 -C extra-filename=-4bb424f3a7cef4f6 --out-dir /home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/deps -C incremental=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/incremental -L dependency=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/deps --extern path_dep=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate/target/debug/deps/libpath_dep-bdbed90518da5aa3.rmeta -Zunstable-options`
Finished dev [unoptimized + debuginfo] target(s) in 0.37s And with $ git checkout ../Cargo.toml
$ cargo clean
$ ../../target/debug/cargo-clippy clippy -v
Checking path_dep v0.1.0 (/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/path_dep)
!!! Running `/home/pkrones/rust-lang/rust-clippy/target/debug/clippy-driver rustc --crate-name path_dep path_dep/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=758172c486bda354 -C extra-filename=-758172c486bda354 --out-dir /home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/deps -C incremental=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/incremental -L dependency=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/deps -Zunstable-options`
Checking subcrate v0.1.0 (/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/subcrate)
Running `/home/pkrones/rust-lang/rust-clippy/target/debug/clippy-driver rustc --crate-name subcrate subcrate/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=75da0d1bce2f8558 -C extra-filename=-75da0d1bce2f8558 --out-dir /home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/deps -C incremental=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/incremental -L dependency=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/deps --extern path_dep=/home/pkrones/rust-lang/rust-clippy/clippy_workspace_tests/target/debug/deps/libpath_dep-758172c486bda354.rmeta -Zunstable-options`
Finished dev [unoptimized + debuginfo] target(s) in 0.31s @ehuss Is this intended behavior? If this is intended, I guess this part of Clippy is really useless: Lines 294 to 306 in 3cd6ca0
|
Where are you seeing the dogfood test not run? |
If I run |
Yes. There is a subtle distinction that path dependencies in a |
Ugh. I thought I had it working... |
I have a fix, but after fixing 5 or 6 errors in Clippy, now the I will fix them and open a PR tomorrow. |
Ok cool. It seems like the dogfood "subprojects" test can become "test all the things"? |
oh no.. I'll have a look 😅 |
Yep, that's exactly my fix. |
changelog: none
In response to #6733 (comment)