forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recognize multiple sentinel files for determining the build root (pan…
…tsbuild#8105) ## Problem We cannot have implicit runtime dependencies on files in the buildroot - they must all be declared explicitly via `BUILD` entries. pantsbuild#8066 fixed several of these issues, but not all. However, we cannot explicitly depend on the file `./pants` because it breaks V1 test execution. When running tests with V1, the folder in `.pants.d` will strip the prefix so `src/python/pants` -> `pants`. You cannot both have a directory named `pants` and a file named `pants`, so this causes most V1 tests to fail. ## Solution Use multiple sentinel files to establish the buildroot, such as `BUILD_ROOT`. This allows us to safely depend on a sentinel file with very few code changes.
- Loading branch information
1 parent
ac31ea9
commit 6695a69
Showing
13 changed files
with
107 additions
and
108 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Used for our tests to find the build root, as we cannot safely use `./pants` | ||
# for the sentinel filename per https://github.com/pantsbuild/pants/pull/8105. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,2 @@ | ||
tests/python/pants_test/backend/jvm/subsystems:shader | ||
tests/python/pants_test/backend/jvm/targets:jar_dependency | ||
tests/python/pants_test/backend/jvm/tasks/jvm_compile/java:java_compile_settings_partitioning | ||
tests/python/pants_test/backend/jvm/tasks/jvm_compile:jvm_compile | ||
tests/python/pants_test/backend/native/subsystems:subsystems | ||
tests/python/pants_test/base:build_root | ||
tests/python/pants_test/build_graph:build_file_aliases | ||
tests/python/pants_test/init:init | ||
tests/python/pants_test/invalidation:build_invalidator | ||
tests/python/pants_test/ivy:bootstrapper | ||
tests/python/pants_test/ivy:ivy_subsystem | ||
tests/python/pants_test/java/distribution:distribution | ||
tests/python/pants_test/option:testing |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.