-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix source root stripping to not strip
requirements.txt
files in pl…
…ugins (#11712) The `PythonRequirementsFileSources` is like a `files()` target in that its source roots should not be stripped. However, in #9640, we "fixed" it to not subclass `FilesSources` because this was causing lots of issues with the file being unintentionally included in chroots. Yet, as a result, using `await Get(StrippedSourceFiles)` will try to strip the file, unless the plugin author uses `for_sources_type` and leaves off the type in the allowlist. This PR allows us to properly handle both use cases by generifying the mechanism for "unrooted sources". Now, any `Sources` subclass can express whether it uses source roots, i.e. it's no longer hardcoded to `FilesSources`. [ci skip-rust] [ci skip-build-wheels]
- Loading branch information
1 parent
030c99f
commit 305d62f
Showing
6 changed files
with
23 additions
and
8 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
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 |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
|
||
class FilesSources(Sources): | ||
required = True | ||
uses_source_roots = False | ||
|
||
|
||
class Files(Target): | ||
|
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