aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skylarkinterface
Commit message (Collapse)AuthorAge
* ConfigurationFragmentPolicy: assume Skylark names, allow merging.Gravatar Michael Staib2016-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for allowing aspects to have their own configuration fragments specified, allow ConfigurationFragmentPolicy.Builder to merge with built policies more easily, setting up SetMultimaps in place of maps of sets. This changes how named (Skylark) fragments are declared in the RuleContext builder, hopefully to be a bit easier to write. In order to do this, make SkylarkModuleNameResolver the only name resolver in use (because it is the only name resolver which exists) so as to not worry about collisions of different name resolvers. This also changes isLegalConfigurationFragment's one-argument form to mean "legal in ANY configuration" rather than "legal in the target (NONE) configuration", as that is how it's used by TransitiveTargetFunction. Uses of it to mean the latter have been revised to be more explicit. Also in this CL: * refactor ConfigurationFragmentPolicy to enforce its contracts about which ConfigurationTransitions are legal * use containsEntry or containsValue rather than looking in get(key) or values() for the configuration fragment multimaps * add tests for ConfigurationFragmentPolicy * make SkylarkModuleNameResolver a static method -- MOS_MIGRATED_REVID=112191439
* Move annotation classes used for referencing framework Java classes from ↵Gravatar John Field2015-12-16
Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies. While we're here: - Removed a couple of unused BUILD deps flagged in []. - Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and clarify the intent of the test. -- MOS_MIGRATED_REVID=110360763