aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages
diff options
context:
space:
mode:
authorGravatar Greg Estren <gregce@google.com>2015-10-27 21:15:24 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2015-10-28 16:02:20 +0000
commit955a23aa730d8b397ac6684c06fd657f8d75b0bf (patch)
tree061cc445e9d53083ed660fae062a55f92965276d /src/main/java/com/google/devtools/build/lib/packages
parent0eeeae14d4a666eb87e1c5965a9ee78df2a32a57 (diff)
Change default for rule classes that don't explicitly
declare required configuration fragments: from *everything* to *nothing*. Now that all builtin rules properly declare their fragments, the "backwards compatibility" concern that inspired the original behavior is no longer needed. This impacts, for example, filegroup rules, which have nothing to declare. -- MOS_MIGRATED_REVID=106433791
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java b/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java
index abad84899e..9833174066 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java
@@ -72,10 +72,6 @@ public final class ConfigurationFragmentPolicy {
* Declares that the implementation of the associated rule class requires the given
* configuration fragments to be present in the configuration. The value is inherited by
* subclasses.
- *
- * <p>For backwards compatibility, if the set is empty, all fragments may be accessed. But note
- * that this is only enforced in the {@link com.google.devtools.build.lib.analysis.RuleContext}
- * class.
*/
public Builder requiresConfigurationFragments(Collection<Class<?>> configurationFragments) {
requiredConfigurationFragments.addAll(configurationFragments);
@@ -86,10 +82,6 @@ public final class ConfigurationFragmentPolicy {
* Declares that the implementation of the associated rule class requires the given
* configuration fragments to be present in the configuration. The value is inherited by
* subclasses.
- *
- * <p>For backwards compatibility, if the set is empty, all fragments may be accessed. But note
- * that this is only enforced in the {@link com.google.devtools.build.lib.analysis.RuleContext}
- * class.
*/
public Builder requiresConfigurationFragments(Class<?>... configurationFragments) {
Collections.addAll(requiredConfigurationFragments, configurationFragments);
@@ -131,8 +123,7 @@ public final class ConfigurationFragmentPolicy {
/**
* The set of required configuration fragments; this should list all fragments that can be
- * accessed by the rule implementation. If empty, all fragments are allowed to be accessed for
- * backwards compatibility.
+ * accessed by the rule implementation.
*/
private final ImmutableSet<Class<?>> requiredConfigurationFragments;
@@ -168,8 +159,7 @@ public final class ConfigurationFragmentPolicy {
/**
* The set of required configuration fragments; this contains all fragments that can be
- * accessed by the rule implementation. If empty, all fragments are allowed to be accessed for
- * backwards compatibility.
+ * accessed by the rule implementation.
*/
public Set<Class<?>> getRequiredConfigurationFragments() {
return requiredConfigurationFragments;