diff options
author | Lukacs Berki <lberki@google.com> | 2015-09-15 13:56:14 +0000 |
---|---|---|
committer | John Field <jfield@google.com> | 2015-09-15 20:27:47 +0000 |
commit | a6434361097c0ee18c706bf7a86a93324f68e284 (patch) | |
tree | 98a3109cb41b1f6cbcb5bae4f9452fdb81553ae4 /src/main/java/com/google/devtools/build/lib/packages/RuleClass.java | |
parent | 5d737d642623749c8672916548b7c7c85b2ca9e6 (diff) |
Parse the label syntax "@//a:b" so that eventually we can make that the syntax that means "refer to the main repository".
There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways.
--
MOS_MIGRATED_REVID=103088960
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages/RuleClass.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/RuleClass.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java index 1e7dd2a46f..34ff1aff55 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java +++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java @@ -29,6 +29,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Ordering; +import com.google.devtools.build.lib.cmdline.LabelSyntaxException; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.packages.Attribute.ConfigurationTransition; @@ -40,7 +41,6 @@ import com.google.devtools.build.lib.syntax.FragmentClassNameResolver; import com.google.devtools.build.lib.syntax.FuncallExpression; import com.google.devtools.build.lib.syntax.GlobList; import com.google.devtools.build.lib.syntax.Label; -import com.google.devtools.build.lib.syntax.Label.SyntaxException; import com.google.devtools.build.lib.syntax.Runtime; import com.google.devtools.build.lib.util.StringUtil; import com.google.devtools.build.lib.vfs.PathFragment; @@ -1315,7 +1315,7 @@ public final class RuleClass { */ Rule createRuleWithLabel(Package.Builder pkgBuilder, Label ruleLabel, Map<String, Object> attributeValues, EventHandler eventHandler, FuncallExpression ast, - Location location) throws SyntaxException, InterruptedException { + Location location) throws LabelSyntaxException, InterruptedException { Rule rule = pkgBuilder.newRuleWithLabel(ruleLabel, this, null, location); createRuleCommon(rule, pkgBuilder, attributeValues, eventHandler, ast); return rule; @@ -1323,7 +1323,7 @@ public final class RuleClass { private void createRuleCommon(Rule rule, Package.Builder pkgBuilder, Map<String, Object> attributeValues, EventHandler eventHandler, FuncallExpression ast) - throws SyntaxException, InterruptedException { + throws LabelSyntaxException, InterruptedException { populateRuleAttributeValues( rule, pkgBuilder, attributeValues, eventHandler, ast); rule.populateOutputFiles(eventHandler, pkgBuilder); @@ -1365,7 +1365,7 @@ public final class RuleClass { Rule createRuleWithParsedAttributeValues(Label label, Package.Builder pkgBuilder, Location ruleLocation, Map<String, ParsedAttributeValue> attributeValues, EventHandler eventHandler) - throws SyntaxException, InterruptedException { + throws LabelSyntaxException, InterruptedException { Rule rule = pkgBuilder.newRuleWithLabel(label, this, null, ruleLocation); rule.checkValidityPredicate(eventHandler); |