-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic incompatible target skipping
This patch aims to implement a basic version of incompatible target skipping outlined here: https://docs.google.com/document/d/12n5QNHmFSkuh5yAbdEex64ot4hRgR-moL1zRimU7wHQ/edit?usp=sharing The implementation in this patch supports only "top level" target skipping. In other words we only filter out targets if they are globbed as part of an invocation like "bazel build //...". The following features are not yet implemented: - Filtering targets based on transitive dependencies. For example, if //a:b depends on //c:d an invocation of "bazel build //a/..." will still build //c:d even if it is incompatible with the current platform. - Being able to select() on constraint values. For example, it's not possible to select() based on whether or not GCC is being used. Discussion of this aspect of the proposal is ongoing: https://groups.google.com/d/msg/bazel-dev/xK7diubpljQ/s3KSRwTWAQAJ The goal is to implement the missing features in follow-up patches. Austin Schuh ([email protected]) provided me with the majority of the logic in TopLevelConstraintSemantics.java. I added the remaining error reporting logic and the tests. The patch largely re-uses the existing support for skipping targets based on incompatible CPU constraints. There are a few enhancements to the error reporting so that it's a little more obvious on the command line when a target was skipped. To a lesser extent the Build Event Stream should also contain less misleading information now. I did have to introduce the notion of to-be-failed targets determined during the analysis phase. For now these are targets that are incompatible with the current platform, but were explicitly requested on the command line. The list of targets ("targetsToFail" in AnalysisResult) is used to affect the outcome of the build. I.e. if the list is non-empty, then the build is considered to have failed.
- Loading branch information
Showing
18 changed files
with
557 additions
and
42 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
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.