aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/constraints/SupportedEnvironmentsProvider.java
Commit message (Collapse)AuthorAge
* Provide clearer messaging when a build fails because a rule'sGravatar Greg Estren2016-06-27
| | | | | | | | | | | | | | | | | | supported environments get refined away by incompatible select paths. This is a fix of TODO: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/constraints/ConstraintSemantics.java#L597 Old message: ERROR: /workspace/foo/BUILD:3:1: in cc_binary rule //foo:main: all environments have been refined out of the following groups: //buildenv:environment_group New message: ERROR: /workspace/foo/BUILD:3:1: in cc_binary rule //foo:main: the current command-line flags disqualify all supported environments because of incompatible select() paths: environment: //buildenv:gce removed by: //util/lib:some_dep_with_select (/workspace/util/lib/BUILD:12:1) -- MOS_MIGRATED_REVID=125788804
* Make constraints and select() work well with each other.Gravatar Greg Estren2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements most of a design proposal that splits constraint checking into two pieces: *static* checks, which apply the standard constraint checking done today, and *refined* checks, which selectively prune environments based on select paths and check that not every environment gets pruned out. As a result of this change, dependencies like: java_library( name = "lib", restricted_to = [":A", ":B"], deps = select({ ":config_a": [":depA"], ":config_b": [":depB"], })) java_library( name = "depA", restricted_to = [":A"]) java_library( name = "depB", restricted_to = [":B"]) are allowed. Specifically, even though neither "depA" nor "depB" supports [":A", ":B"], the combination of the two does. So the select as a whole supports all environments declared in lib, even though only one of those environments actually gets chosen for a given build. Refinement makes lib "match" the chosen path. So for "config_a" builds, lib's environment set is "refined" down to [":A"], meaning [":B"]-restricted rules cannot depend on it. Likewise, for "config_b" builds, lib's environment set is "refined" down to [":B"], meaning [":A"]-restricted rules cannot depend on it. This guarantees that the restrictions imposed by the chosen select path propagate faithfully up the dependency chain. See new documentation in ConstraintSemantics.java for more details. -- MOS_MIGRATED_REVID=120464241
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957