Revert "Fix the compile-test tests when setting Cargo's build.build-dir setting to a path that's distinct from target-dir."#16623
Merged
samueltardieu merged 1 commit intorust-lang:masterfrom Feb 23, 2026
Conversation
…dir` setting to a path that's distinct from `target-dir`." This reverts commit 2737b26 as it prevents Clippy tests from passing when running inside the compiler repository.
Member
Author
|
I'll merge this as-is, as it "unaccepts" a PR I accepted which has not yet been propagated upstream. |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 24, 2026
… `target-dir` (#16626) Second attempt after the previous revert in #16623. Fixes #16567. This time I'm using an env var of the `CARGO_BIN_EXE_*` class, to determine the correct path to the `clippy-driver` executable. This is a simpler change that, conveniently enough, also fixes the build within rust-lang/rust. I verified that it does. Also, extend the fix to `CARGO_CLIPPY_PATH` in tests/test_utils, which also fixes the dogfood tests in environments with a custom `build.build-dir`. Over all, this fixes the compile-test tests and dogfood tests, which presently don't run when Cargo's `build.build-dir` is set to a path that's distinct from `target-dir`. Right now, the uitest harness assumes that `clippy-driver` (a final build artifact) is located in the parent directory of `compile_test-…` (an intermediate artifact or, rather, a dependency's final artifact), and that doesn't hold when `build-dir` is configured independently from `target-dir`, like so (in ~/.cargo/config.toml): ```toml [build] build-dir = "{cargo-cache-home}/build-artifacts/{workspace-path-hash}" ``` changelog: none r? @samueltardieu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts commit 2737b26 as it prevents Clippy tests from passing when running inside the compiler repository.
changelog: none
r? @flip1995