Enable Aspects to specify their configuration fragment dependencies.
Note: This specification currently does not have any effect, but soon...
In the default mode, when an aspect does not call any of the configuration
fragment methods on its AspectDefinition.Builder, the old behavior will
persist; aspects can only access fragments their associated rule has access
to, and have no guarantee as to what those fragments are.
This mode will become deprecated with a future CL.
If an aspect does call a configuration fragment method, it will have a
configuration fragment policy. In a future CL, this will mean it will be
restricted to accessing only those fragments, but will be understood as
requiring access to them for the purposes of dynamic configuration, even if
the rule it is attached to or created by does not otherwise require them.
Eventually, all aspects will be required to declare their configuration
fragments this way.
Skylark aspects may also declare configuration fragments as of this CL.
Two new parameters are added to the aspect() function, fragments and
host_fragments, mirroring the similar parameters for rules.
If both of these parameters are empty or unspecified, the default mode
is used, as with normal aspects.
Also in this CL:
* Minor javadoc fixes for AspectDefinition.
* Additional tests for AspectDefinition.
--
MOS_MIGRATED_REVID=112271713
diff --git a/src/test/java/com/google/devtools/build/lib/BUILD b/src/test/java/com/google/devtools/build/lib/BUILD
index 4b622f3..231c0ce 100644
--- a/src/test/java/com/google/devtools/build/lib/BUILD
+++ b/src/test/java/com/google/devtools/build/lib/BUILD
@@ -480,6 +480,7 @@
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib:java-rules",
"//src/main/java/com/google/devtools/build/lib:packages",
+ "//src/main/java/com/google/devtools/build/lib:skylarkinterface",
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
@@ -871,6 +872,7 @@
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib:vfs",
"//src/main/java/com/google/devtools/build/lib/actions",
+ "//src/main/java/com/google/devtools/build/lib/rules/cpp",
"//src/main/java/com/google/devtools/build/skyframe",
"//third_party:guava",
"//third_party:guava-testlib",