aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/config/ConfigSetting.java
Commit message (Collapse)AuthorAge
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Add more thorough error reporting behavior for when config_setting has ↵Gravatar juliexxia2017-09-22
| | | | | | multiple constraint_values from the same constraint_setting (re: #350) PiperOrigin-RevId: 169577576
* Allow config_settings to match on constraint_values to a target_platform. ↵Gravatar juliexxia2017-09-21
| | | | | | This is on the way to making select() work with constraint_values re: #305. PiperOrigin-RevId: 169454982
* Move RuleConfiguredTarget to lib.analysis.configuredtargets.Gravatar gregce2017-09-19
| | | | | | This is a trivial change with a large file footprint. PiperOrigin-RevId: 169169864
* Release config_setting.flag_values from the whitelist.Gravatar mstaib2017-09-01
| | | | | | | | This feature is opening up beyond just ConfigFeatureFlags, and so should not be restricted. RELNOTES: None. PiperOrigin-RevId: 167195959
* Remove FeaturePolicyConfiguration et al. in favor of the new Whitelisting.Gravatar mstaib2017-08-22
| | | | | | | | This migrates the config_feature_flag implementation over and removes the old flag (which was not used except to test it). Fare thee well, old flag. RELNOTES: None. PiperOrigin-RevId: 165995681
* Remove unnecessary options parser caching.Gravatar ccalvarin2017-08-18
| | | | | | | The options parser already has a static cache of all the reflection work performed. There can still be costs associated with the obtaining and combining of options classes (see the BlazeCommandDispatcher's additional caching), but in this case, each parser is made with a single options class, and none of the class-name extraction was being cached, so I think there was nothing gained. RELNOTES: None. PiperOrigin-RevId: 165613107
* Move RuleConfiguredTargetFactory to lib.analysisGravatar ulfjack2017-08-07
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164446955
* Move AliasProvider to lib.analysisGravatar ulfjack2017-08-07
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164438390
* Support multiple --define's in config_setting.Gravatar gregce2017-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the problem that config_setting( name = "a_and_b", values = { "define": "a=c", "define": "b=d" }) doesn't work as expected because BUILD parsing removes duplicate dictionary keys in accordance with Pythonic behavior. Even worse, Skylark will soon enforce this more aggressively by making this an outright error. This change introduces the define_values attribute: config_setting( name = "a_and_b", values = { "normal_flag": "normal_value", }, define_values = { "a: "c", "b": "d" }) This is equivalent to "$ bazel build ... --normal_flag=normal_value --define a=c --define b=d" at the command line. Also tried to clean up some ConfigSetting naming for clarity around the different kind of flags. PiperOrigin-RevId: 162627180
* Moves printing method for feature accessibility errors.Gravatar plf2017-07-12
| | | | | | | | The method is moved to FeaturePolicyConfiguration.java so that it can be used by unrelated parts of the code using feature policies for whitelisting. RELNOTES:none PiperOrigin-RevId: 161648169
* Enable --feature_control_policy policy for feature flag usage.Gravatar mstaib2017-07-03
| | | | | | | | | | To limit rollout of this potentially risky feature, a new policy is added to the --feature_control_policy feature list. The contents of the package_group pointed to by that label are then used to control which targets are allowed to use feature flags and related features. RELNOTES: None. PiperOrigin-RevId: 160686186
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Fix aliases for users of label-keyed string dicts.Gravatar mstaib2017-06-01
| | | | | | | | | | | | | | | | | Aliases mess with the assumption that attributeValue.containsKey(target.getLabel()) for every target in the prerequisites of a LABEL_KEYED_STRING_DICT attribute. The solution is to use AliasProvider.getDependencyLabel(target) instead. This fixes it for all current users, including SkylarkRuleContext. This also adjusts config_setting flag_values and Android feature_flags to do intelligent things with aliases in their respective attributes. RELNOTES: None. PiperOrigin-RevId: 157594095
* Add flag_values attribute to config_setting.Gravatar mstaib2017-04-10
| | | | | | | | | | | | | This gives the ability to select on config_feature_flags. They still have not been publicly documented, because there's no way to set them. But, progress. config_setting still needs to have either values or flag_values; it cannot have both be empty. However, values is no longer mandatory, nor must it be nonempty (as long as flag_values is set nonempty). RELNOTES: None. PiperOrigin-RevId: 152515036
* Move ConfigSetting into rules/config.Gravatar mstaib2017-04-06
ConfigSetting was previously in analysis/config, where it was slightly out of place (as it is a rule, not an integral part of the analysis backend). This is also necessary to integrate it with ConfigFeatureFlag, as otherwise this would be a circular dependency (analysis/config <-> rules/config). ConfigFeatureFlagRule itself has been moved into ConfigRuleClasses, where it can use the ConfigBaseRule and the nonconfigurable reason from the other configuration rules. RELNOTES: None. PiperOrigin-RevId: 152275823