Automated refactor of Label.parseAbsolute() to always pass a repository mapping

RELNOTES: None
PiperOrigin-RevId: 202360925
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java
index 4b32382..ae3b235 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java
@@ -277,7 +277,7 @@
 
     public Builder setPrelude(String preludeLabelString) {
       try {
-        this.preludeLabel = Label.parseAbsolute(preludeLabelString);
+        this.preludeLabel = Label.parseAbsolute(preludeLabelString, ImmutableMap.of());
       } catch (LabelSyntaxException e) {
         String errorMsg =
             String.format("Prelude label '%s' is invalid: %s", preludeLabelString, e.getMessage());
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ToolchainContext.java b/src/main/java/com/google/devtools/build/lib/analysis/ToolchainContext.java
index dea3985..3f22aa6 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/ToolchainContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/ToolchainContext.java
@@ -200,7 +200,7 @@
       Label toolchainType = null;
       String rawLabel = (String) key;
       try {
-        toolchainType = Label.parseAbsolute(rawLabel);
+        toolchainType = Label.parseAbsolute(rawLabel, ImmutableMap.of());
       } catch (LabelSyntaxException e) {
         throw new EvalException(
             loc, String.format("Unable to parse toolchain %s: %s", rawLabel, e.getMessage()), e);
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
index e9980f8..faa0891 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
@@ -169,7 +169,7 @@
       if (!input.startsWith("/") && !input.startsWith("@")) {
         input = "//" + input;
       }
-      return Label.parseAbsolute(input);
+      return Label.parseAbsolute(input, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new OptionsParsingException(e.getMessage());
     }
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/DefaultsPackage.java b/src/main/java/com/google/devtools/build/lib/analysis/config/DefaultsPackage.java
index e53dc0e..90e74b3 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/DefaultsPackage.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/DefaultsPackage.java
@@ -141,7 +141,7 @@
 
   public static Label parseOptionalLabel(String value) {
     try {
-      return Label.parseAbsolute(value);
+      return Label.parseAbsolute(value, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       // We ignore this exception here - it will cause an error message at a later time.
       return null;
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/RunUnderConverter.java b/src/main/java/com/google/devtools/build/lib/analysis/config/RunUnderConverter.java
index 51f1d84..58b4e49 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/RunUnderConverter.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/RunUnderConverter.java
@@ -14,6 +14,7 @@
 package com.google.devtools.build.lib.analysis.config;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
 import com.google.devtools.build.lib.shell.ShellUtils;
@@ -45,7 +46,7 @@
         ImmutableList.copyOf(runUnderList.subList(1, runUnderList.size()));
     if (runUnderCommand.startsWith("//")) {
       try {
-        final Label runUnderLabel = Label.parseAbsolute(runUnderCommand);
+        final Label runUnderLabel = Label.parseAbsolute(runUnderCommand, ImmutableMap.of());
         return new RunUnderLabel(input, runUnderLabel, runUnderSuffix);
       } catch (LabelSyntaxException e) {
         throw new OptionsParsingException("Not a valid label " + e.getMessage());
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleClassFunctions.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleClassFunctions.java
index 85e3b97..5a8d444 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleClassFunctions.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleClassFunctions.java
@@ -385,7 +385,7 @@
     ImmutableList.Builder<Label> requiredToolchains = new ImmutableList.Builder<>();
     for (String rawLabel : rawLabels) {
       try {
-        Label toolchainLabel = Label.parseAbsolute(rawLabel);
+        Label toolchainLabel = Label.parseAbsolute(rawLabel, ImmutableMap.of());
         requiredToolchains.add(toolchainLabel);
       } catch (LabelSyntaxException e) {
         throw new EvalException(
@@ -401,7 +401,7 @@
     ImmutableList.Builder<Label> constraintLabels = new ImmutableList.Builder<>();
     for (String rawLabel : rawLabels) {
       try {
-        Label constraintLabel = Label.parseAbsolute(rawLabel);
+        Label constraintLabel = Label.parseAbsolute(rawLabel, ImmutableMap.of());
         constraintLabels.add(constraintLabel);
       } catch (LabelSyntaxException e) {
         throw new EvalException(
diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/Label.java b/src/main/java/com/google/devtools/build/lib/cmdline/Label.java
index 3f11858..873d85e 100644
--- a/src/main/java/com/google/devtools/build/lib/cmdline/Label.java
+++ b/src/main/java/com/google/devtools/build/lib/cmdline/Label.java
@@ -98,13 +98,21 @@
    * </pre>
    *
    * <p>Treats labels in the default repository as being in the main repository instead.
+   *
+   * <p>Labels that begin with a repository name may have the repository name remapped to a
+   * different name if it appears in {@code repositoryMapping}. This happens if the current
+   * repository being evaluated is external to the main repository and the main repository set the
+   * {@code repo_mapping} attribute when declaring this repository.
+   *
+   * @param absName label-like string to be parsed
+   * @param repositoryMapping map of repository names from the local name found in the current
+   *     repository to the global name declared in the main repository
    */
-  @Deprecated
-  // TODO(b/110698008): deprecate this method and only have parseAbsolute() methods that pass
-  // a repositoryMapping
-  public static Label parseAbsolute(String absName) throws LabelSyntaxException {
+  public static Label parseAbsolute(
+      String absName, ImmutableMap<RepositoryName, RepositoryName> repositoryMapping)
+      throws LabelSyntaxException {
     return parseAbsolute(
-        absName, /* defaultToMain= */ true, /* repositoryMapping= */ ImmutableMap.of());
+        absName, /* defaultToMain= */ true, repositoryMapping);
   }
 
   /**
@@ -123,7 +131,10 @@
    * repository being evaluated is external to the main repository and the main repository set the
    * {@code repo_mapping} attribute when declaring this repository.
    *
+   * @param absName label-like string to be parsed
    * @param defaultToMain Treat labels in the default repository as being in the main one instead.
+   * @param repositoryMapping map of repository names from the local name found in the current
+   *     repository to the global name declared in the main repository
    */
   public static Label parseAbsolute(
       String absName,
@@ -242,7 +253,7 @@
       throws LabelSyntaxException {
     Preconditions.checkArgument(!workspaceRelativePath.isAbsolute());
     if (LabelValidator.isAbsolute(label)) {
-      return parseAbsolute(label);
+      return parseAbsolute(label, ImmutableMap.of());
     }
     int index = label.indexOf(':');
     if (index < 0) {
diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
index 1b1f5e7..c256c5f 100644
--- a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
+++ b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
@@ -19,6 +19,7 @@
 import com.google.common.base.Preconditions;
 import com.google.common.base.Splitter;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
@@ -900,7 +901,7 @@
   // TargetParsingException.
   private static Label label(String label) throws TargetParsingException {
     try {
-      return Label.parseAbsolute(label);
+      return Label.parseAbsolute(label, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new TargetParsingException("invalid target format: '"
           + StringUtilities.sanitizeControlChars(label) + "'; "
diff --git a/src/main/java/com/google/devtools/build/lib/packages/ConstantRuleVisibility.java b/src/main/java/com/google/devtools/build/lib/packages/ConstantRuleVisibility.java
index 34920f5..9f56318 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/ConstantRuleVisibility.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/ConstantRuleVisibility.java
@@ -14,6 +14,7 @@
 package com.google.devtools.build.lib.packages;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
 import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
@@ -42,9 +43,9 @@
 
   static {
     try {
-      PUBLIC_LABEL = Label.parseAbsolute("//visibility:public");
-      LEGACY_PUBLIC_LABEL = Label.parseAbsolute("//visibility:legacy_public");
-      PRIVATE_LABEL = Label.parseAbsolute("//visibility:private");
+      PUBLIC_LABEL = Label.parseAbsolute("//visibility:public", ImmutableMap.of());
+      LEGACY_PUBLIC_LABEL = Label.parseAbsolute("//visibility:legacy_public", ImmutableMap.of());
+      PRIVATE_LABEL = Label.parseAbsolute("//visibility:private", ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new IllegalStateException();
     }
diff --git a/src/main/java/com/google/devtools/build/lib/packages/License.java b/src/main/java/com/google/devtools/build/lib/packages/License.java
index 4a8c758..579c29e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/License.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/License.java
@@ -16,6 +16,7 @@
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableTable;
 import com.google.common.collect.Sets;
@@ -210,7 +211,8 @@
     for (String str : licStrings) {
       if (str.startsWith("exception=")) {
         try {
-          Label label = Label.parseAbsolute(str.substring("exception=".length()));
+          Label label =
+              Label.parseAbsolute(str.substring("exception=".length()), ImmutableMap.of());
           exceptions.add(label);
         } catch (LabelSyntaxException e) {
           throw new LicenseParsingException(e.getMessage());
diff --git a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java
index 5c5c222..cac3570 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactory.java
@@ -369,7 +369,7 @@
           throws EvalException, InterruptedException {
         Label nameLabel;
         try {
-          nameLabel = Label.parseAbsolute("//external:" + name);
+          nameLabel = Label.parseAbsolute("//external:" + name, ImmutableMap.of());
           try {
             Package.Builder builder = PackageFactory.getContext(env, ast.getLocation()).pkgBuilder;
             RuleClass ruleClass = ruleFactory.getRuleClass("bind");
@@ -377,7 +377,7 @@
                 builder,
                 ruleClass,
                 nameLabel,
-                actual == null ? null : Label.parseAbsolute(actual),
+                actual == null ? null : Label.parseAbsolute(actual, ImmutableMap.of()),
                 ast.getLocation(),
                 ruleFactory.getAttributeContainer(ruleClass));
           } catch (RuleFactory.InvalidRuleException
diff --git a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactoryHelper.java b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactoryHelper.java
index ff95dc8..2a264e4 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactoryHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceFactoryHelper.java
@@ -16,6 +16,7 @@
 
 import com.google.common.base.Preconditions;
 import com.google.common.base.Verify;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
@@ -54,7 +55,7 @@
     overwriteRule(pkg, rule);
     for (Map.Entry<String, Label> entry :
         ruleClass.getExternalBindingsFunction().apply(rule).entrySet()) {
-      Label nameLabel = Label.parseAbsolute("//external:" + entry.getKey());
+      Label nameLabel = Label.parseAbsolute("//external:" + entry.getKey(), ImmutableMap.of());
       addBindRule(
           pkg,
           bindRuleClass,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
index efaabf0..a94bbb6 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
@@ -790,7 +790,7 @@
   public Label getSkylarkStl() {
     if (stlLabel == null) {
       try {
-        return Label.parseAbsolute("//third_party/stl");
+        return Label.parseAbsolute("//third_party/stl", ImmutableMap.of());
       } catch (LabelSyntaxException e) {
         throw new IllegalStateException("STL label not formatted correctly", e);
       }
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
index a4e2d3f..8f91dba 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfigurationLoader.java
@@ -14,7 +14,7 @@
 
 package com.google.devtools.build.lib.rules.cpp;
 
-
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.devtools.build.lib.analysis.RedirectChaser;
 import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
@@ -149,7 +149,7 @@
     if (cppOptions.getFdoOptimize() != null) {
       if (cppOptions.getFdoOptimize().startsWith("//")) {
         try {
-          fdoProfileLabel = Label.parseAbsolute(cppOptions.getFdoOptimize());
+          fdoProfileLabel = Label.parseAbsolute(cppOptions.getFdoOptimize(), ImmutableMap.of());
         } catch (LabelSyntaxException e) {
           throw new InvalidConfigurationException(e);
         }
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
index 33a3112..4c54850 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
@@ -104,7 +104,7 @@
         throw new OptionsParsingException("Not a label");
       }
       try {
-        return Label.parseAbsolute(input)
+        return Label.parseAbsolute(input, ImmutableMap.of())
             .getRelativeWithRemapping(LIBC_RELATIVE_LABEL, ImmutableMap.of());
       } catch (LabelSyntaxException e) {
         throw new OptionsParsingException(e.getMessage());
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java
index b4e437f..73055b4 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaConfiguration.java
@@ -211,7 +211,7 @@
     ImmutableList.Builder<Label> translationsBuilder = ImmutableList.builder();
     for (String s : javaOptions.translationTargets) {
       try {
-        Label label = Label.parseAbsolute(s);
+        Label label = Label.parseAbsolute(s, ImmutableMap.of());
         translationsBuilder.add(label);
       } catch (LabelSyntaxException e) {
         throw new InvalidConfigurationException("Invalid translations target '" + s + "', make " +
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/NewRepositoryFileHandler.java b/src/main/java/com/google/devtools/build/lib/rules/repository/NewRepositoryFileHandler.java
index 5e3e92f..b1c809d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/NewRepositoryFileHandler.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/NewRepositoryFileHandler.java
@@ -14,6 +14,7 @@
 
 package com.google.devtools.build.lib.rules.repository;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.actions.FileValue;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
@@ -183,7 +184,7 @@
       Label label;
       try {
         // Parse a label
-        label = Label.parseAbsolute(getFileAttributeValue(rule));
+        label = Label.parseAbsolute(getFileAttributeValue(rule), ImmutableMap.of());
       } catch (LabelSyntaxException ex) {
         throw new RepositoryFunctionException(
             new EvalException(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java
index c5e6d03..bf3a52a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java
@@ -17,6 +17,7 @@
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.io.BaseEncoding;
 import com.google.devtools.build.lib.actions.FileStateValue.RegularFileStateValue;
 import com.google.devtools.build.lib.actions.FileValue;
@@ -206,7 +207,7 @@
       RootedPath rootedPath;
       String fileKey = key.substring(5);
       if (LabelValidator.isAbsolute(fileKey)) {
-        rootedPath = getRootedPathFromLabel(Label.parseAbsolute(fileKey), env);
+        rootedPath = getRootedPathFromLabel(Label.parseAbsolute(fileKey, ImmutableMap.of()), env);
       } else {
         // TODO(pcloudy): Removing checking absolute path, they should all be absolute label.
         PathFragment filePathFragment = PathFragment.create(fileKey);
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternValue.java
index 49f80af..9e3d0ef 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/TargetPatternValue.java
@@ -15,6 +15,7 @@
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.cmdline.Label;
@@ -73,7 +74,7 @@
 
   private Label labelFromString(String labelString) {
     try {
-      return Label.parseAbsolute(labelString);
+      return Label.parseAbsolute(labelString, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new IllegalStateException(e);
     }
diff --git a/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java b/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java
index 022ecdd..72c782f 100644
--- a/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java
+++ b/src/test/java/com/google/devtools/build/lib/actions/CustomCommandLineTest.java
@@ -19,6 +19,7 @@
 
 import com.google.common.base.Joiner;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.actions.Artifact.SpecialArtifact;
 import com.google.devtools.build.lib.actions.Artifact.SpecialArtifactType;
 import com.google.devtools.build.lib.actions.Artifact.TreeFileArtifact;
@@ -67,7 +68,8 @@
     assertThat(builder().addDynamicString("--arg").build().arguments())
         .containsExactly("--arg")
         .inOrder();
-    assertThat(builder().addLabel(Label.parseAbsolute("//a:b")).build().arguments())
+    assertThat(
+            builder().addLabel(Label.parseAbsolute("//a:b", ImmutableMap.of())).build().arguments())
         .containsExactly("//a:b")
         .inOrder();
     assertThat(builder().addPath(PathFragment.create("path")).build().arguments())
@@ -93,7 +95,11 @@
     assertThat(builder().add("--arg", "val").build().arguments())
         .containsExactly("--arg", "val")
         .inOrder();
-    assertThat(builder().addLabel("--arg", Label.parseAbsolute("//a:b")).build().arguments())
+    assertThat(
+            builder()
+                .addLabel("--arg", Label.parseAbsolute("//a:b", ImmutableMap.of()))
+                .build()
+                .arguments())
         .containsExactly("--arg", "//a:b")
         .inOrder();
     assertThat(builder().addPath("--arg", PathFragment.create("path")).build().arguments())
@@ -131,7 +137,10 @@
         .containsExactly("prefix-foo")
         .inOrder();
     assertThat(
-            builder().addPrefixedLabel("prefix-", Label.parseAbsolute("//a:b")).build().arguments())
+            builder()
+                .addPrefixedLabel("prefix-", Label.parseAbsolute("//a:b", ImmutableMap.of()))
+                .build()
+                .arguments())
         .containsExactly("prefix-//a:b")
         .inOrder();
     assertThat(
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java
index 2c84679..acf57fd 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AnalysisFailureReportingTest.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Multimap;
 import com.google.common.eventbus.Subscribe;
@@ -119,7 +120,7 @@
     assertThat(collector.events.get(topLevel))
         .containsExactly(
             new LoadingFailedCause(
-                Label.parseAbsolute("//cycles1"),
+                Label.parseAbsolute("//cycles1", ImmutableMap.of()),
                 // TODO(ulfjack): Ideally, we'd get an error message about a symlink cycle instead.
                 "Target '//cycles1:cycles1' contains an error and its package is in error"));
   }
@@ -138,10 +139,10 @@
     assertThat(collector.events.get(topLevel))
         .containsExactly(
             new AnalysisFailedCause(
-                Label.parseAbsolute("//foo"),
-                toId(Iterables
-                    .getOnlyElement(result.getTopLevelTargetsWithConfigs())
-                    .getConfiguration()),
+                Label.parseAbsolute("//foo", ImmutableMap.of()),
+                toId(
+                    Iterables.getOnlyElement(result.getTopLevelTargetsWithConfigs())
+                        .getConfiguration()),
                 "target '//bar:bar' is not visible from target '//foo:foo'. "
                     + "Check the visibility declaration of the former target if you think the "
                     + "dependency is legitimate"));
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AspectAwareAttributeMapperTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AspectAwareAttributeMapperTest.java
index bf0860f..8bb0dee 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AspectAwareAttributeMapperTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AspectAwareAttributeMapperTest.java
@@ -75,7 +75,7 @@
   @Test
   public void getRuleAttributeValue() throws Exception {
     assertThat(mapper.get("srcs", BuildType.LABEL_LIST))
-        .containsExactly(Label.parseAbsolute("//foo:a.cc"));
+        .containsExactly(Label.parseAbsolute("//foo:a.cc", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AspectValueTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AspectValueTest.java
index b0cf53b..c8dd262 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AspectValueTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AspectValueTest.java
@@ -14,6 +14,7 @@
 package com.google.devtools.build.lib.analysis;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.testing.EqualsTester;
 import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
 import com.google.devtools.build.lib.analysis.util.AnalysisTestCase;
@@ -42,9 +43,9 @@
     update();
     BuildConfiguration c1 = getTargetConfiguration();
     BuildConfiguration c2 = getHostConfiguration();
-    Label l1 = Label.parseAbsolute("//a:l1");
-    Label l1b = Label.parseAbsolute("//a:l1");
-    Label l2 = Label.parseAbsolute("//a:l2");
+    Label l1 = Label.parseAbsolute("//a:l1", ImmutableMap.of());
+    Label l1b = Label.parseAbsolute("//a:l1", ImmutableMap.of());
+    Label l2 = Label.parseAbsolute("//a:l2", ImmutableMap.of());
     AspectParameters i1 = new AspectParameters.Builder()
         .addAttribute("foo", "bar")
         .build();
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java b/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java
index e336d46..25e0c83 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java
@@ -22,6 +22,7 @@
 
 import com.google.common.base.Function;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
@@ -240,7 +241,8 @@
     assertThat(recorder.events)
         .contains(
             new LoadingFailureEvent(
-                Label.parseAbsolute("//pkg:foo"), Label.parseAbsolute("//nopackage:missing")));
+                Label.parseAbsolute("//pkg:foo", ImmutableMap.of()),
+                Label.parseAbsolute("//nopackage:missing", ImmutableMap.of())));
     assertContainsEvent("missing value for mandatory attribute 'outs'");
     assertContainsEvent("no such package 'nopackage'");
     // Skyframe correctly reports the other root cause as the genrule itself (since it is
@@ -249,7 +251,8 @@
     assertThat(recorder.events)
         .contains(
             new LoadingFailureEvent(
-                Label.parseAbsolute("//pkg:foo"), Label.parseAbsolute("//pkg:foo")));
+                Label.parseAbsolute("//pkg:foo", ImmutableMap.of()),
+                Label.parseAbsolute("//pkg:foo", ImmutableMap.of())));
   }
 
   @Test
@@ -279,13 +282,14 @@
         .that(
             recorder.events.contains(
                 new LoadingFailureEvent(
-                    Label.parseAbsolute("//third_party/first"),
-                    Label.parseAbsolute("//third_party/fourth"))))
+                    Label.parseAbsolute("//third_party/first", ImmutableMap.of()),
+                    Label.parseAbsolute("//third_party/fourth", ImmutableMap.of()))))
         .isTrue();
     assertThat(recorder.events)
-        .contains(new LoadingFailureEvent(
-            Label.parseAbsolute("//third_party/third"),
-            Label.parseAbsolute("//third_party/fourth")));
+        .contains(
+            new LoadingFailureEvent(
+                Label.parseAbsolute("//third_party/third", ImmutableMap.of()),
+                Label.parseAbsolute("//third_party/fourth", ImmutableMap.of())));
   }
 
   @Test
@@ -305,10 +309,14 @@
     assertThat(recorder.events).hasSize(2);
     assertThat(recorder.events)
         .contains(
-            new LoadingFailureEvent(Label.parseAbsolute("//gp"), Label.parseAbsolute("//c1:not")));
+            new LoadingFailureEvent(
+                Label.parseAbsolute("//gp", ImmutableMap.of()),
+                Label.parseAbsolute("//c1:not", ImmutableMap.of())));
     assertThat(recorder.events)
         .contains(
-            new LoadingFailureEvent(Label.parseAbsolute("//gp"), Label.parseAbsolute("//c2:not")));
+            new LoadingFailureEvent(
+                Label.parseAbsolute("//gp", ImmutableMap.of()),
+                Label.parseAbsolute("//c2:not", ImmutableMap.of())));
   }
 
   /**
@@ -348,7 +356,8 @@
     Iterable<Label> labels = Iterables.transform(targets, target -> target.getLabel());
     assertThat(labels)
         .containsExactly(
-            Label.parseAbsolute("//package:inner"), Label.parseAbsolute("//package:file"));
+            Label.parseAbsolute("//package:inner", ImmutableMap.of()),
+            Label.parseAbsolute("//package:file", ImmutableMap.of()));
   }
 
   @Test
@@ -372,12 +381,11 @@
 
     Dependency innerDependency =
         Dependency.withTransitionAndAspects(
-            Label.parseAbsolute("//package:inner"),
+            Label.parseAbsolute("//package:inner", ImmutableMap.of()),
             NoTransition.INSTANCE,
             AspectCollection.EMPTY);
     Dependency fileDependency =
-        Dependency.withNullConfiguration(
-            Label.parseAbsolute("//package:file"));
+        Dependency.withNullConfiguration(Label.parseAbsolute("//package:file", ImmutableMap.of()));
 
     assertThat(targets).containsExactly(innerDependency, fileDependency);
   }
@@ -831,8 +839,12 @@
     assertThat(result.hasError()).isTrue();
     assertThat(recorder.events)
         .containsExactly(
-            new LoadingFailureEvent(Label.parseAbsolute("//gp"), Label.parseAbsolute("//cycles1")),
-            new LoadingFailureEvent(Label.parseAbsolute("//gp"), Label.parseAbsolute("//cycles2")));
+            new LoadingFailureEvent(
+                Label.parseAbsolute("//gp", ImmutableMap.of()),
+                Label.parseAbsolute("//cycles1", ImmutableMap.of())),
+            new LoadingFailureEvent(
+                Label.parseAbsolute("//gp", ImmutableMap.of()),
+                Label.parseAbsolute("//cycles2", ImmutableMap.of())));
   }
 
   /**
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/ConfigurableAttributesTest.java b/src/test/java/com/google/devtools/build/lib/analysis/ConfigurableAttributesTest.java
index 6d4ba5f..2c905db 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/ConfigurableAttributesTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/ConfigurableAttributesTest.java
@@ -18,6 +18,7 @@
 import static org.junit.Assert.fail;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.analysis.config.ConfigurationEnvironment;
 import com.google.devtools.build.lib.analysis.config.ConfigurationEnvironment.TargetProviderEnvironment;
 import com.google.devtools.build.lib.analysis.config.InvalidConfigurationException;
@@ -368,22 +369,25 @@
 
     // Legal case:
     assertThat(
-            RedirectChaser
-                .followRedirects(env, Label.parseAbsolute("//java/hello:good_base"), "srcs")
+            RedirectChaser.followRedirects(
+                    env, Label.parseAbsolute("//java/hello:good_base", ImmutableMap.of()), "srcs")
                 .toString())
         .isEqualTo("//java/hello:actual_content");
 
     // Legal case:
     assertThat(
-            RedirectChaser
-                .followRedirects(env, Label.parseAbsolute("//java/hello:base_non_filegroup_target"),
+            RedirectChaser.followRedirects(
+                    env,
+                    Label.parseAbsolute(
+                        "//java/hello:base_non_filegroup_target", ImmutableMap.of()),
                     "srcs")
                 .toString())
         .isEqualTo("//java/hello:non_filegroup_target");
 
     // Illegal case:
     try {
-      RedirectChaser.followRedirects(env, Label.parseAbsolute("//java/hello:bad_base"), "srcs");
+      RedirectChaser.followRedirects(
+          env, Label.parseAbsolute("//java/hello:bad_base", ImmutableMap.of()), "srcs");
       fail("Expected RedirectChaser to fail on a sequence with configurable 'srcs' values");
     } catch (InvalidConfigurationException e) {
       // Expected failure..
@@ -1129,8 +1133,8 @@
     useConfiguration("--test_arg=a");
     ConfiguredTargetAndData ctad = getConfiguredTargetAndData("//foo:rule");
     AttributeMap attributes = getMapperFromConfiguredTargetAndTarget(ctad);
-    assertThat(attributes.get("dep", BuildType.LABEL)).isEqualTo(
-        Label.parseAbsolute("//foo:default"));
+    assertThat(attributes.get("dep", BuildType.LABEL))
+        .isEqualTo(Label.parseAbsolute("//foo:default", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java b/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java
index 759bdef..3da6225 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java
@@ -19,6 +19,7 @@
 import static com.google.devtools.build.lib.packages.BuildType.LABEL;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.analysis.config.BuildOptions;
 import com.google.devtools.build.lib.analysis.config.transitions.PatchTransition;
@@ -92,9 +93,10 @@
         "    name = 'latebound_dep')");
     update("//foo:foo");
     assertThat(getConfiguredTarget("//foo:foo", getTargetConfiguration())).isNotNull();
-    ConfiguredTarget dep = Iterables.getOnlyElement(
-        SkyframeExecutorTestUtils.getExistingConfiguredTargets(
-            skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep")));
+    ConfiguredTarget dep =
+        Iterables.getOnlyElement(
+            SkyframeExecutorTestUtils.getExistingConfiguredTargets(
+                skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep", ImmutableMap.of())));
     assertThat(getConfiguration(dep)).isNotEqualTo(getTargetConfiguration());
     assertThat(LateBoundSplitUtil.getOptions(getConfiguration(dep)).fooFlag).isEqualTo("PATCHED!");
   }
@@ -114,9 +116,10 @@
         "    name = 'latebound_dep')");
     update("//foo:gen");
     assertThat(getConfiguredTarget("//foo:foo", getHostConfiguration())).isNotNull();
-    ConfiguredTarget dep = Iterables.getOnlyElement(
-        SkyframeExecutorTestUtils.getExistingConfiguredTargets(
-            skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep")));
+    ConfiguredTarget dep =
+        Iterables.getOnlyElement(
+            SkyframeExecutorTestUtils.getExistingConfiguredTargets(
+                skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep", ImmutableMap.of())));
     assertThat(getConfiguration(dep)).isEqualTo(getHostConfiguration());
     // This is technically redundant, but slightly stronger in sanity checking that the host
     // configuration doesn't happen to match what the patch would have done.
@@ -132,8 +135,9 @@
         "    name = 'latebound_dep')");
     // if the target fails to analyze, this iterable will be empty
     assertThat(update("//foo:foo").getTargetsToBuild()).isNotEmpty();
-    Iterable<ConfiguredTarget> deps = SkyframeExecutorTestUtils.getExistingConfiguredTargets(
-        skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep"));
+    Iterable<ConfiguredTarget> deps =
+        SkyframeExecutorTestUtils.getExistingConfiguredTargets(
+            skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep", ImmutableMap.of()));
     assertThat(deps).hasSize(2);
     assertThat(
             ImmutableList.of(
@@ -157,9 +161,10 @@
         "    name = 'latebound_dep')");
     update("//foo:gen");
     assertThat(getConfiguredTarget("//foo:foo", getHostConfiguration())).isNotNull();
-    ConfiguredTarget dep = Iterables.getOnlyElement(
-        SkyframeExecutorTestUtils.getExistingConfiguredTargets(
-            skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep")));
+    ConfiguredTarget dep =
+        Iterables.getOnlyElement(
+            SkyframeExecutorTestUtils.getExistingConfiguredTargets(
+                skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep", ImmutableMap.of())));
     assertThat(getConfiguration(dep)).isEqualTo(getHostConfiguration());
     // This is technically redundant, but slightly stronger in sanity checking that the host
     // configuration doesn't happen to match what the split would have done.
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/ConfiguredAttributeMapperTest.java b/src/test/java/com/google/devtools/build/lib/analysis/ConfiguredAttributeMapperTest.java
index 237b1f0..15a90a8 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/ConfiguredAttributeMapperTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/ConfiguredAttributeMapperTest.java
@@ -15,6 +15,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.analysis.config.CompilationMode;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
 import com.google.devtools.build.lib.cmdline.Label;
@@ -124,21 +125,24 @@
           }
         };
 
-    final Label binSrc = Label.parseAbsolute("//a:bin.sh");
+    final Label binSrc = Label.parseAbsolute("//a:bin.sh", ImmutableMap.of());
 
     useConfiguration("--define", "mode=a");
     getMapper("//a:bin").visitLabels(testVisitor);
-    assertThat(visitedLabels).containsExactly(binSrc, Label.parseAbsolute("//a:adep"));
+    assertThat(visitedLabels)
+        .containsExactly(binSrc, Label.parseAbsolute("//a:adep", ImmutableMap.of()));
 
     visitedLabels.clear();
     useConfiguration("--define", "mode=b");
     getMapper("//a:bin").visitLabels(testVisitor);
-    assertThat(visitedLabels).containsExactly(binSrc, Label.parseAbsolute("//a:bdep"));
+    assertThat(visitedLabels)
+        .containsExactly(binSrc, Label.parseAbsolute("//a:bdep", ImmutableMap.of()));
 
     visitedLabels.clear();
     useConfiguration("--define", "mode=c");
     getMapper("//a:bin").visitLabels(testVisitor);
-    assertThat(visitedLabels).containsExactly(binSrc, Label.parseAbsolute("//a:defaultdep"));
+    assertThat(visitedLabels)
+        .containsExactly(binSrc, Label.parseAbsolute("//a:defaultdep", ImmutableMap.of()));
   }
 
   /**
@@ -172,7 +176,7 @@
 
     // Target configuration is in dbg mode, so we should match //conditions:b:
     assertThat(getMapper("//a:gen").get("tools", BuildType.LABEL_LIST))
-        .containsExactly(Label.parseAbsolute("//a:bdep"));
+        .containsExactly(Label.parseAbsolute("//a:bdep", ImmutableMap.of()));
 
     // Verify the "tools" dep uses a different configuration that's not also in "dbg":
     assertThat(
@@ -202,7 +206,9 @@
         ")");
     useConfiguration("--define", "foo=a", "--define", "bar=d");
     assertThat(getMapper("//hello:gen").get("srcs", BuildType.LABEL_LIST))
-        .containsExactly(Label.parseAbsolute("//hello:a.in"), Label.parseAbsolute("//hello:d.in"));
+        .containsExactly(
+            Label.parseAbsolute("//hello:a.in", ImmutableMap.of()),
+            Label.parseAbsolute("//hello:d.in", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java b/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java
index 9ab7d59..26005cf 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/DependencyResolverTest.java
@@ -108,7 +108,8 @@
 
   private OrderedSetMultimap<Attribute, Dependency> dependentNodeMap(
       String targetName, NativeAspectClass aspect) throws Exception {
-    Target target = packageManager.getTarget(reporter, Label.parseAbsolute(targetName));
+    Target target =
+        packageManager.getTarget(reporter, Label.parseAbsolute(targetName, ImmutableMap.of()));
     return dependencyResolver.dependentNodeMap(
         new TargetAndConfiguration(target, getTargetConfiguration()),
         getHostConfiguration(),
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java b/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java
index 57f0e63..bf8f9ab 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/DependencyTest.java
@@ -40,9 +40,10 @@
 public class DependencyTest extends AnalysisTestCase {
   @Test
   public void withNullConfiguration_BasicAccessors() throws Exception {
-    Dependency nullDep = Dependency.withNullConfiguration(Label.parseAbsolute("//a"));
+    Dependency nullDep =
+        Dependency.withNullConfiguration(Label.parseAbsolute("//a", ImmutableMap.of()));
 
-    assertThat(nullDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
+    assertThat(nullDep.getLabel()).isEqualTo(Label.parseAbsolute("//a", ImmutableMap.of()));
     assertThat(nullDep.hasExplicitConfiguration()).isTrue();
     assertThat(nullDep.getConfiguration()).isNull();
     assertThat(nullDep.getAspects().getAllAspects()).isEmpty();
@@ -59,9 +60,10 @@
   public void withConfiguration_BasicAccessors() throws Exception {
     update();
     Dependency targetDep =
-        Dependency.withConfiguration(Label.parseAbsolute("//a"), getTargetConfiguration());
+        Dependency.withConfiguration(
+            Label.parseAbsolute("//a", ImmutableMap.of()), getTargetConfiguration());
 
-    assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
+    assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a", ImmutableMap.of()));
     assertThat(targetDep.hasExplicitConfiguration()).isTrue();
     assertThat(targetDep.getConfiguration()).isEqualTo(getTargetConfiguration());
     assertThat(targetDep.getAspects().getAllAspects()).isEmpty();
@@ -83,9 +85,9 @@
         ImmutableSet.of(simpleAspect, attributeAspect));
     Dependency targetDep =
         Dependency.withConfigurationAndAspects(
-            Label.parseAbsolute("//a"), getTargetConfiguration(), twoAspects);
+            Label.parseAbsolute("//a", ImmutableMap.of()), getTargetConfiguration(), twoAspects);
 
-    assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
+    assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a", ImmutableMap.of()));
     assertThat(targetDep.hasExplicitConfiguration()).isTrue();
     assertThat(targetDep.getConfiguration()).isEqualTo(getTargetConfiguration());
     assertThat(targetDep.getAspects()).isEqualTo(twoAspects);
@@ -110,7 +112,8 @@
     AspectCollection twoAspects = AspectCollection.createForTests(simpleAspect, attributeAspect);
 
     try {
-      Dependency.withConfigurationAndAspects(Label.parseAbsolute("//a"), null, twoAspects);
+      Dependency.withConfigurationAndAspects(
+          Label.parseAbsolute("//a", ImmutableMap.of()), null, twoAspects);
       fail("should not be allowed to create a dependency with a null configuration");
     } catch (NullPointerException expected) {
       // good. you fell rrrrright into my trap.
@@ -122,7 +125,7 @@
     update();
     Dependency dep =
         Dependency.withConfigurationAndAspects(
-            Label.parseAbsolute("//a"),
+            Label.parseAbsolute("//a", ImmutableMap.of()),
             getTargetConfiguration(),
             AspectCollection.EMPTY);
     // Here we're also checking that this doesn't throw an exception. No boom? OK. Good.
@@ -140,9 +143,12 @@
         simpleAspect, getTargetConfiguration(), attributeAspect, getHostConfiguration());
     Dependency targetDep =
         Dependency.withConfiguredAspects(
-            Label.parseAbsolute("//a"), getTargetConfiguration(), aspects, twoAspectMap);
+            Label.parseAbsolute("//a", ImmutableMap.of()),
+            getTargetConfiguration(),
+            aspects,
+            twoAspectMap);
 
-    assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
+    assertThat(targetDep.getLabel()).isEqualTo(Label.parseAbsolute("//a", ImmutableMap.of()));
     assertThat(targetDep.hasExplicitConfiguration()).isTrue();
     assertThat(targetDep.getConfiguration()).isEqualTo(getTargetConfiguration());
     assertThat(targetDep.getAspects().getAllAspects())
@@ -165,7 +171,8 @@
     update();
     Dependency dep =
         Dependency.withConfiguredAspects(
-            Label.parseAbsolute("//a"), getTargetConfiguration(),
+            Label.parseAbsolute("//a", ImmutableMap.of()),
+            getTargetConfiguration(),
             AspectCollection.EMPTY,
             ImmutableMap.<AspectDescriptor, BuildConfiguration>of());
     // Here we're also checking that this doesn't throw an exception. No boom? OK. Good.
@@ -180,9 +187,9 @@
         ImmutableSet.of(simpleAspect, attributeAspect));
     Dependency hostDep =
         Dependency.withTransitionAndAspects(
-            Label.parseAbsolute("//a"), HostTransition.INSTANCE, twoAspects);
+            Label.parseAbsolute("//a", ImmutableMap.of()), HostTransition.INSTANCE, twoAspects);
 
-    assertThat(hostDep.getLabel()).isEqualTo(Label.parseAbsolute("//a"));
+    assertThat(hostDep.getLabel()).isEqualTo(Label.parseAbsolute("//a", ImmutableMap.of()));
     assertThat(hostDep.hasExplicitConfiguration()).isFalse();
     assertThat(hostDep.getAspects().getAllAspects())
         .containsExactlyElementsIn(twoAspects.getAllAspects());
@@ -217,7 +224,8 @@
     update();
     Dependency dep =
         Dependency.withTransitionAndAspects(
-            Label.parseAbsolute("//a"), HostTransition.INSTANCE,
+            Label.parseAbsolute("//a", ImmutableMap.of()),
+            HostTransition.INSTANCE,
             AspectCollection.EMPTY);
     // Here we're also checking that this doesn't throw an exception. No boom? OK. Good.
     assertThat(dep.getAspects().getAllAspects()).isEmpty();
@@ -228,7 +236,7 @@
     update();
 
     new NullPointerTester()
-        .setDefault(Label.class, Label.parseAbsolute("//a"))
+        .setDefault(Label.class, Label.parseAbsolute("//a", ImmutableMap.of()))
         .setDefault(BuildConfiguration.class, getTargetConfiguration())
         .testAllPublicStaticMethods(Dependency.class);
   }
@@ -237,9 +245,9 @@
   public void equalsPassesEqualsTester() throws Exception {
     update();
 
-    Label a = Label.parseAbsolute("//a");
-    Label aExplicit = Label.parseAbsolute("//a:a");
-    Label b = Label.parseAbsolute("//b");
+    Label a = Label.parseAbsolute("//a", ImmutableMap.of());
+    Label aExplicit = Label.parseAbsolute("//a:a", ImmutableMap.of());
+    Label b = Label.parseAbsolute("//b", ImmutableMap.of());
 
     BuildConfiguration host = getHostConfiguration();
     BuildConfiguration target = getTargetConfiguration();
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/LicensingTests.java b/src/test/java/com/google/devtools/build/lib/analysis/LicensingTests.java
index 99d5777..3a6c671 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/LicensingTests.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/LicensingTests.java
@@ -500,7 +500,7 @@
     for (int i = 0; i < strings.length; i += 2) {
       String labelStr = strings[i];
       String licStr = strings[i + 1];
-      Label label = Label.parseAbsolute(labelStr);
+      Label label = Label.parseAbsolute(labelStr, ImmutableMap.of());
       List<String> splitLicenses =
           licStr.isEmpty() ? Arrays.<String>asList() : Arrays.asList(licStr.split(","));
       License license = License.parseLicense(splitLicenses);
@@ -546,7 +546,7 @@
     ConfiguredTarget used = getConfiguredTarget("//used");
     Map<Label, License> usedActual =
         Maps.filterKeys(getTransitiveLicenses(used), AnalysisMock.get().ccSupport().labelFilter());
-    Label usedLabel = Label.parseAbsolute("//used");
+    Label usedLabel = Label.parseAbsolute("//used", ImmutableMap.of());
     License license = usedActual.get(usedLabel);
     license.checkCompatibility(EnumSet.of(DistributionType.CLIENT),
         getTarget("//user"), usedLabel, reporter, false);
@@ -570,7 +570,7 @@
     ConfiguredTarget used = getConfiguredTarget("//used");
     Map<Label, License> usedActual =
         Maps.filterKeys(getTransitiveLicenses(used), AnalysisMock.get().ccSupport().labelFilter());
-    Label usedLabel = Label.parseAbsolute("//used");
+    Label usedLabel = Label.parseAbsolute("//used", ImmutableMap.of());
     License license = usedActual.get(usedLabel);
     license.checkCompatibility(EnumSet.of(DistributionType.CLIENT),
         getTarget("//user"), usedLabel, reporter, false);
@@ -652,8 +652,8 @@
 
   @Test
   public void testTargetLicenseEquality() throws Exception {
-    Label label1 = Label.parseAbsolute("//foo");
-    Label label2 = Label.parseAbsolute("//bar");
+    Label label1 = Label.parseAbsolute("//foo", ImmutableMap.of());
+    Label label2 = Label.parseAbsolute("//bar", ImmutableMap.of());
     License restricted = License.parseLicense(ImmutableList.of("restricted"));
     License unencumbered = License.parseLicense(ImmutableList.of("unencumbered"));
     new EqualsTester()
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/config/BuildConfigurationTest.java b/src/test/java/com/google/devtools/build/lib/analysis/config/BuildConfigurationTest.java
index cda90b9..baa2940 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/config/BuildConfigurationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/config/BuildConfigurationTest.java
@@ -17,6 +17,7 @@
 import static org.junit.Assert.fail;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableSortedSet;
 import com.google.common.collect.Iterables;
@@ -192,12 +193,15 @@
   @Test
   public void testTargetEnvironment() throws Exception {
     BuildConfiguration oneEnvConfig = create("--target_environment=//foo");
-    assertThat(oneEnvConfig.getTargetEnvironments()).containsExactly(Label.parseAbsolute("//foo"));
+    assertThat(oneEnvConfig.getTargetEnvironments())
+        .containsExactly(Label.parseAbsolute("//foo", ImmutableMap.of()));
 
     BuildConfiguration twoEnvsConfig =
         create("--target_environment=//foo", "--target_environment=//bar");
     assertThat(twoEnvsConfig.getTargetEnvironments())
-        .containsExactly(Label.parseAbsolute("//foo"), Label.parseAbsolute("//bar"));
+        .containsExactly(
+            Label.parseAbsolute("//foo", ImmutableMap.of()),
+            Label.parseAbsolute("//bar", ImmutableMap.of()));
 
     BuildConfiguration noEnvsConfig = create();
     assertThat(noEnvsConfig.getTargetEnvironments()).isEmpty();
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/select/RawAttributeMapperTest.java b/src/test/java/com/google/devtools/build/lib/analysis/select/RawAttributeMapperTest.java
index e1d3045..e5f38cb 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/select/RawAttributeMapperTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/select/RawAttributeMapperTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 import static org.junit.Assert.fail;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.packages.Attribute;
 import com.google.devtools.build.lib.packages.AttributeMap;
@@ -116,9 +117,9 @@
     RawAttributeMapper rawMapper = RawAttributeMapper.of(setupGenRule());
     assertThat(rawMapper.getConfigurabilityKeys("srcs", BuildType.LABEL_LIST))
         .containsExactly(
-            Label.parseAbsolute("//conditions:a"),
-            Label.parseAbsolute("//conditions:b"),
-            Label.parseAbsolute("//conditions:default"));
+            Label.parseAbsolute("//conditions:a", ImmutableMap.of()),
+            Label.parseAbsolute("//conditions:b", ImmutableMap.of()),
+            Label.parseAbsolute("//conditions:default", ImmutableMap.of()));
     assertThat(rawMapper.getConfigurabilityKeys("data", BuildType.LABEL_LIST)).isEmpty();
   }
 
@@ -132,10 +133,11 @@
         "        '//conditions:b': ['b.sh', 'c.sh'],",
         "    }))");
     RawAttributeMapper rawMapper = RawAttributeMapper.of(rule);
-    assertThat(rawMapper.getMergedValues("srcs", BuildType.LABEL_LIST)).containsExactly(
-        Label.parseAbsolute("//x:a.sh"),
-        Label.parseAbsolute("//x:b.sh"),
-        Label.parseAbsolute("//x:c.sh"))
+    assertThat(rawMapper.getMergedValues("srcs", BuildType.LABEL_LIST))
+        .containsExactly(
+            Label.parseAbsolute("//x:a.sh", ImmutableMap.of()),
+            Label.parseAbsolute("//x:b.sh", ImmutableMap.of()),
+            Label.parseAbsolute("//x:c.sh", ImmutableMap.of()))
         .inOrder();
   }
 
@@ -152,12 +154,13 @@
         "            '//conditions:b2': ['b2.sh']})",
         "    )");
     RawAttributeMapper rawMapper = RawAttributeMapper.of(rule);
-    assertThat(rawMapper.getMergedValues("srcs", BuildType.LABEL_LIST)).containsExactly(
-        Label.parseAbsolute("//x:a1.sh"),
-        Label.parseAbsolute("//x:b1.sh"),
-        Label.parseAbsolute("//x:another_b1.sh"),
-        Label.parseAbsolute("//x:a2.sh"),
-        Label.parseAbsolute("//x:b2.sh"))
+    assertThat(rawMapper.getMergedValues("srcs", BuildType.LABEL_LIST))
+        .containsExactly(
+            Label.parseAbsolute("//x:a1.sh", ImmutableMap.of()),
+            Label.parseAbsolute("//x:b1.sh", ImmutableMap.of()),
+            Label.parseAbsolute("//x:another_b1.sh", ImmutableMap.of()),
+            Label.parseAbsolute("//x:a2.sh", ImmutableMap.of()),
+            Label.parseAbsolute("//x:b2.sh", ImmutableMap.of()))
         .inOrder();
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java
index 4477724..949f658 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/AnalysisTestCase.java
@@ -407,7 +407,7 @@
     ensureUpdateWasCalled();
     Label parsedLabel;
     try {
-      parsedLabel = Label.parseAbsolute(label);
+      parsedLabel = Label.parseAbsolute(label, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new AssertionError(e);
     }
@@ -416,8 +416,8 @@
 
   protected Target getTarget(String label) throws InterruptedException {
     try {
-      return SkyframeExecutorTestUtils.getExistingTarget(skyframeExecutor,
-          Label.parseAbsolute(label));
+      return SkyframeExecutorTestUtils.getExistingTarget(
+          skyframeExecutor, Label.parseAbsolute(label, ImmutableMap.of()));
     } catch (LabelSyntaxException e) {
       throw new AssertionError(e);
     }
@@ -452,7 +452,7 @@
       String label, BuildConfiguration configuration) {
     Label parsedLabel;
     try {
-      parsedLabel = Label.parseAbsolute(label);
+      parsedLabel = Label.parseAbsolute(label, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new AssertionError(e);
     }
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
index fa47f7a..b92ae7f 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
@@ -357,7 +357,7 @@
   protected Target getTarget(String label)
       throws NoSuchPackageException, NoSuchTargetException,
       LabelSyntaxException, InterruptedException {
-    return getTarget(Label.parseAbsolute(label));
+    return getTarget(Label.parseAbsolute(label, ImmutableMap.of()));
   }
 
   protected Target getTarget(Label label)
@@ -552,7 +552,7 @@
 
   protected final ConfiguredTarget getDirectPrerequisite(ConfiguredTarget target, String label)
       throws Exception {
-    Label candidateLabel = Label.parseAbsolute(label);
+    Label candidateLabel = Label.parseAbsolute(label, ImmutableMap.of());
     for (ConfiguredTarget candidate : getDirectPrerequisites(target)) {
       if (candidate.getLabel().equals(candidateLabel)) {
         return candidate;
@@ -564,7 +564,7 @@
 
   protected final ConfiguredTargetAndData getConfiguredTargetAndDataDirectPrerequisite(
       ConfiguredTargetAndData ctad, String label) throws Exception {
-    Label candidateLabel = Label.parseAbsolute(label);
+    Label candidateLabel = Label.parseAbsolute(label, ImmutableMap.of());
     for (ConfiguredTargetAndData candidate : getDirectPrerequisites(ctad)) {
       if (candidate.getConfiguredTarget().getLabel().equals(candidateLabel)) {
         return candidate;
@@ -829,7 +829,7 @@
    */
   protected ConfiguredTarget getConfiguredTarget(String label, BuildConfiguration config)
       throws LabelSyntaxException {
-    return getConfiguredTarget(Label.parseAbsolute(label), config);
+    return getConfiguredTarget(Label.parseAbsolute(label, ImmutableMap.of()), config);
   }
 
   /**
@@ -861,7 +861,7 @@
    */
   public ConfiguredTargetAndData getConfiguredTargetAndData(String label)
       throws LabelSyntaxException {
-    return getConfiguredTargetAndData(Label.parseAbsolute(label), targetConfig);
+    return getConfiguredTargetAndData(Label.parseAbsolute(label, ImmutableMap.of()), targetConfig);
   }
 
   /**
@@ -1486,7 +1486,7 @@
 
   public static Label makeLabel(String label) {
     try {
-      return Label.parseAbsolute(label);
+      return Label.parseAbsolute(label, ImmutableMap.of());
     } catch (LabelSyntaxException e) {
       throw new IllegalStateException(e);
     }
@@ -1782,7 +1782,7 @@
   public static Set<Label> asLabelSet(Iterable<String> strings) throws LabelSyntaxException {
     Set<Label> result = Sets.newTreeSet();
     for (String s : strings) {
-      result.add(Label.parseAbsolute(s));
+      result.add(Label.parseAbsolute(s, ImmutableMap.of()));
     }
     return result;
   }
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java b/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java
index 22220e5..d5fe190 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/TestAspects.java
@@ -21,6 +21,7 @@
 import com.google.common.base.Function;
 import com.google.common.collect.ImmutableCollection;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.Artifact;
@@ -421,7 +422,9 @@
       ImmutableCollection<String> baz = aspectParameters.getAttribute("baz");
       if (baz != null) {
         try {
-          builder.add(attr("$dep", LABEL).value(Label.parseAbsolute(baz.iterator().next())));
+          builder.add(
+              attr("$dep", LABEL)
+                  .value(Label.parseAbsolute(baz.iterator().next(), ImmutableMap.of())));
         } catch (LabelSyntaxException e) {
           throw new IllegalStateException();
         }
diff --git a/src/test/java/com/google/devtools/build/lib/cmdline/LabelTest.java b/src/test/java/com/google/devtools/build/lib/cmdline/LabelTest.java
index 4465a04..17bc1e2 100644
--- a/src/test/java/com/google/devtools/build/lib/cmdline/LabelTest.java
+++ b/src/test/java/com/google/devtools/build/lib/cmdline/LabelTest.java
@@ -39,22 +39,22 @@
   @Test
   public void testAbsolute() throws Exception {
     {
-      Label l = Label.parseAbsolute("//foo/bar:baz");
+      Label l = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
       assertThat(l.getPackageName()).isEqualTo("foo/bar");
       assertThat(l.getName()).isEqualTo("baz");
     }
     {
-      Label l = Label.parseAbsolute("//foo/bar");
+      Label l = Label.parseAbsolute("//foo/bar", ImmutableMap.of());
       assertThat(l.getPackageName()).isEqualTo("foo/bar");
       assertThat(l.getName()).isEqualTo("bar");
     }
     {
-      Label l = Label.parseAbsolute("//:bar");
+      Label l = Label.parseAbsolute("//:bar", ImmutableMap.of());
       assertThat(l.getPackageName()).isEmpty();
       assertThat(l.getName()).isEqualTo("bar");
     }
     {
-      Label l = Label.parseAbsolute("@foo");
+      Label l = Label.parseAbsolute("@foo", ImmutableMap.of());
       assertThat(l.getPackageIdentifier().getRepository().getName()).isEqualTo("@foo");
       assertThat(l.getPackageName()).isEmpty();
       assertThat(l.getName()).isEqualTo("foo");
@@ -100,7 +100,7 @@
 
   @Test
   public void testGetRelativeWithAbsoluteLabel() throws Exception {
-    Label base = Label.parseAbsolute("//foo/bar:baz");
+    Label base = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
     Label l = base.getRelativeWithRemapping("//p1/p2:target", ImmutableMap.of());
     assertThat(l.getPackageName()).isEqualTo("p1/p2");
     assertThat(l.getName()).isEqualTo("target");
@@ -108,7 +108,7 @@
 
   @Test
   public void testGetRelativeWithRelativeLabel() throws Exception {
-    Label base = Label.parseAbsolute("//foo/bar:baz");
+    Label base = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
     Label l = base.getRelativeWithRemapping(":quux", ImmutableMap.of());
     assertThat(l.getPackageName()).isEqualTo("foo/bar");
     assertThat(l.getName()).isEqualTo("quux");
@@ -116,7 +116,7 @@
 
   @Test
   public void testGetRelativeWithIllegalLabel() throws Exception {
-    Label base = Label.parseAbsolute("//foo/bar:baz");
+    Label base = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
     try {
       base.getRelativeWithRemapping("/p1/p2:target", ImmutableMap.of());
       fail();
@@ -210,10 +210,10 @@
 
   @Test
   public void testGetRepositoryRelative() throws Exception {
-    Label defaultBase = Label.parseAbsolute("//foo/bar:baz");
-    Label repoBase = Label.parseAbsolute("@repo//foo/bar:baz");
-    Label mainBase = Label.parseAbsolute("@//foo/bar:baz");
-    Label externalTarget = Label.parseAbsolute("//external:target");
+    Label defaultBase = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
+    Label repoBase = Label.parseAbsolute("@repo//foo/bar:baz", ImmutableMap.of());
+    Label mainBase = Label.parseAbsolute("@//foo/bar:baz", ImmutableMap.of());
+    Label externalTarget = Label.parseAbsolute("//external:target", ImmutableMap.of());
     Label l = defaultBase.resolveRepositoryRelative(externalTarget);
     assertThat(l.getPackageIdentifier().getRepository().isMain()).isTrue();
     assertThat(l.getPackageName()).isEqualTo("external");
@@ -232,9 +232,9 @@
   @Test
   public void testIdentities() throws Exception {
 
-    Label l1 = Label.parseAbsolute("//foo/bar:baz");
-    Label l2 = Label.parseAbsolute("//foo/bar:baz");
-    Label l3 = Label.parseAbsolute("//foo/bar:quux");
+    Label l1 = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
+    Label l2 = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
+    Label l3 = Label.parseAbsolute("//foo/bar:quux", ImmutableMap.of());
 
     new EqualsTester()
         .addEqualityGroup(l1, l2)
@@ -246,15 +246,15 @@
   public void testToString() throws Exception {
     {
       String s = "@//foo/bar:baz";
-      Label l = Label.parseAbsolute(s);
+      Label l = Label.parseAbsolute(s, ImmutableMap.of());
       assertThat(l.toString()).isEqualTo("//foo/bar:baz");
     }
     {
-      Label l = Label.parseAbsolute("//foo/bar");
+      Label l = Label.parseAbsolute("//foo/bar", ImmutableMap.of());
       assertThat(l.toString()).isEqualTo("//foo/bar:bar");
     }
     {
-      Label l = Label.parseAbsolute("@foo");
+      Label l = Label.parseAbsolute("@foo", ImmutableMap.of());
       assertThat(l.toString()).isEqualTo("@foo//:foo");
     }
   }
@@ -262,26 +262,26 @@
   @Test
   public void testToShorthandString() throws Exception {
     {
-      Label l = Label.parseAbsolute("//bar/baz:baz");
+      Label l = Label.parseAbsolute("//bar/baz:baz", ImmutableMap.of());
       assertThat(l.toShorthandString()).isEqualTo("//bar/baz");
     }
     {
-      Label l = Label.parseAbsolute("//bar/baz:bat");
+      Label l = Label.parseAbsolute("//bar/baz:bat", ImmutableMap.of());
       assertThat(l.toShorthandString()).isEqualTo("//bar/baz:bat");
     }
     {
-      Label l = Label.parseAbsolute("@foo//bar/baz:baz");
+      Label l = Label.parseAbsolute("@foo//bar/baz:baz", ImmutableMap.of());
       assertThat(l.toShorthandString()).isEqualTo("@foo//bar/baz");
     }
     {
-      Label l = Label.parseAbsolute("@foo//bar/baz:bat");
+      Label l = Label.parseAbsolute("@foo//bar/baz:bat", ImmutableMap.of());
       assertThat(l.toShorthandString()).isEqualTo("@foo//bar/baz:bat");
     }
   }
 
   @Test
   public void testDotDot() throws Exception {
-    Label.parseAbsolute("//foo/bar:baz..gif");
+    Label.parseAbsolute("//foo/bar:baz..gif", ImmutableMap.of());
   }
 
   /**
@@ -290,7 +290,7 @@
    */
   private static void assertSyntaxError(String expectedError, String label) {
     try {
-      Label.parseAbsolute(label);
+      Label.parseAbsolute(label, ImmutableMap.of());
       fail("Label '" + label + "' did not contain a syntax error");
     } catch (LabelSyntaxException e) {
       assertThat(e).hasMessageThat().containsMatch(Pattern.quote(expectedError));
@@ -336,7 +336,8 @@
 
   @Test
   public void testTrailingDotSegment() throws Exception {
-    assertThat(Label.parseAbsolute("//foo:dir")).isEqualTo(Label.parseAbsolute("//foo:dir/."));
+    assertThat(Label.parseAbsolute("//foo:dir", ImmutableMap.of()))
+        .isEqualTo(Label.parseAbsolute("//foo:dir/.", ImmutableMap.of()));
   }
 
   @Test
@@ -350,18 +351,18 @@
 
   @Test
   public void testSomeGoodLabels() throws Exception {
-    Label.parseAbsolute("//foo:..bar");
-    Label.parseAbsolute("//Foo:..bar");
-    Label.parseAbsolute("//-Foo:..bar");
-    Label.parseAbsolute("//00:..bar");
-    Label.parseAbsolute("//package:foo+bar");
-    Label.parseAbsolute("//package:foo_bar");
-    Label.parseAbsolute("//package:foo=bar");
-    Label.parseAbsolute("//package:foo-bar");
-    Label.parseAbsolute("//package:foo.bar");
-    Label.parseAbsolute("//package:foo@bar");
-    Label.parseAbsolute("//package:foo~bar");
-    Label.parseAbsolute("//$( ):$( )");
+    Label.parseAbsolute("//foo:..bar", ImmutableMap.of());
+    Label.parseAbsolute("//Foo:..bar", ImmutableMap.of());
+    Label.parseAbsolute("//-Foo:..bar", ImmutableMap.of());
+    Label.parseAbsolute("//00:..bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo+bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo_bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo=bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo-bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo.bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo@bar", ImmutableMap.of());
+    Label.parseAbsolute("//package:foo~bar", ImmutableMap.of());
+    Label.parseAbsolute("//$( ):$( )", ImmutableMap.of());
   }
 
   /**
@@ -417,7 +418,7 @@
   }
 
   private void checkSerialization(String labelString, int expectedSize) throws Exception {
-    Label a = Label.parseAbsolute(labelString);
+    Label a = Label.parseAbsolute(labelString, ImmutableMap.of());
     byte[] sa = TestUtils.serializeObject(a);
     assertThat(sa).hasLength(expectedSize);
 
@@ -427,20 +428,20 @@
 
   @Test
   public void testRepoLabel() throws Exception {
-    Label label = Label.parseAbsolute("@foo//bar/baz:bat/boo");
+    Label label = Label.parseAbsolute("@foo//bar/baz:bat/boo", ImmutableMap.of());
     assertThat(label.toString()).isEqualTo("@foo//bar/baz:bat/boo");
   }
 
   @Test
   public void testNoRepo() throws Exception {
-    Label label = Label.parseAbsolute("//bar/baz:bat/boo");
+    Label label = Label.parseAbsolute("//bar/baz:bat/boo", ImmutableMap.of());
     assertThat(label.toString()).isEqualTo("//bar/baz:bat/boo");
   }
 
   @Test
   public void testInvalidRepo() throws Exception {
     try {
-      Label.parseAbsolute("foo//bar/baz:bat/boo");
+      Label.parseAbsolute("foo//bar/baz:bat/boo", ImmutableMap.of());
       fail();
     } catch (LabelSyntaxException e) {
       assertThat(e).hasMessage(
@@ -450,9 +451,9 @@
 
   @Test
   public void testGetWorkspaceRoot() throws Exception {
-    Label label = Label.parseAbsolute("//bar/baz");
+    Label label = Label.parseAbsolute("//bar/baz", ImmutableMap.of());
     assertThat(label.getWorkspaceRoot()).isEmpty();
-    label = Label.parseAbsolute("@repo//bar/baz");
+    label = Label.parseAbsolute("@repo//bar/baz", ImmutableMap.of());
     assertThat(label.getWorkspaceRoot()).isEqualTo("external/repo");
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java b/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java
index 2244ca5..077ee3f 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/AttributeTest.java
@@ -24,6 +24,7 @@
 
 import com.google.common.base.Predicates;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.analysis.config.BuildOptions;
 import com.google.devtools.build.lib.analysis.config.HostTransition;
 import com.google.devtools.build.lib.analysis.config.transitions.SplitTransition;
@@ -149,7 +150,7 @@
     assertDefaultValue("foo",
                        attr("x", STRING).value("foo").build());
 
-    Label label = Label.parseAbsolute("//foo:bar");
+    Label label = Label.parseAbsolute("//foo:bar", ImmutableMap.of());
     assertDefaultValue(null,
                        attr("x", LABEL).legacyAllowAnyFileType().build());
     assertDefaultValue(label,
@@ -161,8 +162,10 @@
     assertDefaultValue(slist,
                        attr("x", STRING_LIST).value(slist).build());
 
-    List<Label> llist = Arrays.asList(Label.parseAbsolute("//foo:bar"),
-                                      Label.parseAbsolute("//foo:wiz"));
+    List<Label> llist =
+        Arrays.asList(
+            Label.parseAbsolute("//foo:bar", ImmutableMap.of()),
+            Label.parseAbsolute("//foo:wiz", ImmutableMap.of()));
     assertDefaultValue(Collections.emptyList(),
                        attr("x", LABEL_LIST).legacyAllowAnyFileType().build());
     assertDefaultValue(llist,
@@ -184,7 +187,7 @@
     assertType(STRING,
                attr("x", STRING).value("foo").build());
 
-    Label label = Label.parseAbsolute("//foo:bar");
+    Label label = Label.parseAbsolute("//foo:bar", ImmutableMap.of());
     assertType(LABEL,
                        attr("x", LABEL).legacyAllowAnyFileType().build());
     assertType(LABEL,
@@ -196,8 +199,10 @@
     assertType(STRING_LIST,
                attr("x", STRING_LIST).value(slist).build());
 
-    List<Label> llist = Arrays.asList(Label.parseAbsolute("//foo:bar"),
-                                      Label.parseAbsolute("//foo:wiz"));
+    List<Label> llist =
+        Arrays.asList(
+            Label.parseAbsolute("//foo:bar", ImmutableMap.of()),
+            Label.parseAbsolute("//foo:wiz", ImmutableMap.of()));
     assertType(LABEL_LIST,
                attr("x", LABEL_LIST).legacyAllowAnyFileType().build());
     assertType(LABEL_LIST,
diff --git a/src/test/java/com/google/devtools/build/lib/packages/BuildTypeTest.java b/src/test/java/com/google/devtools/build/lib/packages/BuildTypeTest.java
index eccc5a5..317b43b 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/BuildTypeTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/BuildTypeTest.java
@@ -53,7 +53,7 @@
 
   @Before
   public final void setCurrentRule() throws Exception  {
-    this.currentRule = Label.parseAbsolute("//quux:baz");
+    this.currentRule = Label.parseAbsolute("//quux:baz", ImmutableMap.of());
     this.labelConversionContext =
         new LabelConversionContext(currentRule, /* repositoryMapping= */ ImmutableMap.of());
   }
@@ -76,22 +76,34 @@
 
   @Test
   public void testLabelKeyedStringDictConvertsToMapFromLabelToString() throws Exception {
-    Map<Object, String> input = new ImmutableMap.Builder<Object, String>()
-        .put("//absolute:label", "absolute value")
-        .put(":relative", "theory of relativity")
-        .put("nocolon", "colonial times")
-        .put("//current/package:explicit", "explicit content")
-        .put(Label.parseAbsolute("//i/was/already/a/label"), "and that's okay")
-        .build();
-    Label context = Label.parseAbsolute("//current/package:this");
+    Map<Object, String> input =
+        new ImmutableMap.Builder<Object, String>()
+            .put("//absolute:label", "absolute value")
+            .put(":relative", "theory of relativity")
+            .put("nocolon", "colonial times")
+            .put("//current/package:explicit", "explicit content")
+            .put(
+                Label.parseAbsolute("//i/was/already/a/label", ImmutableMap.of()),
+                "and that's okay")
+            .build();
+    Label context = Label.parseAbsolute("//current/package:this", ImmutableMap.of());
 
-    Map<Label, String> expected = new ImmutableMap.Builder<Label, String>()
-        .put(Label.parseAbsolute("//absolute:label"), "absolute value")
-        .put(Label.parseAbsolute("//current/package:relative"), "theory of relativity")
-        .put(Label.parseAbsolute("//current/package:nocolon"), "colonial times")
-        .put(Label.parseAbsolute("//current/package:explicit"), "explicit content")
-        .put(Label.parseAbsolute("//i/was/already/a/label"), "and that's okay")
-        .build();
+    Map<Label, String> expected =
+        new ImmutableMap.Builder<Label, String>()
+            .put(Label.parseAbsolute("//absolute:label", ImmutableMap.of()), "absolute value")
+            .put(
+                Label.parseAbsolute("//current/package:relative", ImmutableMap.of()),
+                "theory of relativity")
+            .put(
+                Label.parseAbsolute("//current/package:nocolon", ImmutableMap.of()),
+                "colonial times")
+            .put(
+                Label.parseAbsolute("//current/package:explicit", ImmutableMap.of()),
+                "explicit content")
+            .put(
+                Label.parseAbsolute("//i/was/already/a/label", ImmutableMap.of()),
+                "and that's okay")
+            .build();
 
     assertThat(BuildType.LABEL_KEYED_STRING_DICT.convert(input, null, context))
         .containsExactlyEntriesIn(expected);
@@ -166,7 +178,7 @@
   @Test
   public void testLabelKeyedStringDictConvertingMapWithMultipleEquivalentKeysShouldFail()
       throws Exception {
-    Label context = Label.parseAbsolute("//current/package:this");
+    Label context = Label.parseAbsolute("//current/package:this", ImmutableMap.of());
     Map<String, String> input = new ImmutableMap.Builder<String, String>()
         .put(":reference", "value1")
         .put("//current/package:reference", "value2")
@@ -185,7 +197,7 @@
   @Test
   public void testLabelKeyedStringDictConvertingMapWithMultipleSetsOfEquivalentKeysShouldFail()
       throws Exception {
-    Label context = Label.parseAbsolute("//current/rule:sibling");
+    Label context = Label.parseAbsolute("//current/rule:sibling", ImmutableMap.of());
     Map<String, String> input = new ImmutableMap.Builder<String, String>()
         .put(":rule", "first set")
         .put("//current/rule:rule", "also first set")
@@ -211,7 +223,7 @@
   @Test
   public void testLabelKeyedStringDictErrorConvertingMapWithMultipleEquivalentKeysIncludesContext()
       throws Exception {
-    Label context = Label.parseAbsolute("//current/package:this");
+    Label context = Label.parseAbsolute("//current/package:this", ImmutableMap.of());
     Map<String, String> input = new ImmutableMap.Builder<String, String>()
         .put(":reference", "value1")
         .put("//current/package:reference", "value2")
@@ -229,21 +241,30 @@
 
   @Test
   public void testLabelKeyedStringDictCollectLabels() throws Exception {
-    Map<Label, String> input = new ImmutableMap.Builder<Label, String>()
-        .put(Label.parseAbsolute("//absolute:label"), "absolute value")
-        .put(Label.parseAbsolute("//current/package:relative"), "theory of relativity")
-        .put(Label.parseAbsolute("//current/package:nocolon"), "colonial times")
-        .put(Label.parseAbsolute("//current/package:explicit"), "explicit content")
-        .put(Label.parseAbsolute("//i/was/already/a/label"), "and that's okay")
-        .build();
+    Map<Label, String> input =
+        new ImmutableMap.Builder<Label, String>()
+            .put(Label.parseAbsolute("//absolute:label", ImmutableMap.of()), "absolute value")
+            .put(
+                Label.parseAbsolute("//current/package:relative", ImmutableMap.of()),
+                "theory of relativity")
+            .put(
+                Label.parseAbsolute("//current/package:nocolon", ImmutableMap.of()),
+                "colonial times")
+            .put(
+                Label.parseAbsolute("//current/package:explicit", ImmutableMap.of()),
+                "explicit content")
+            .put(
+                Label.parseAbsolute("//i/was/already/a/label", ImmutableMap.of()),
+                "and that's okay")
+            .build();
 
     ImmutableList<Label> expected =
         ImmutableList.of(
-            Label.parseAbsolute("//absolute:label"),
-            Label.parseAbsolute("//current/package:relative"),
-            Label.parseAbsolute("//current/package:nocolon"),
-            Label.parseAbsolute("//current/package:explicit"),
-            Label.parseAbsolute("//i/was/already/a/label"));
+            Label.parseAbsolute("//absolute:label", ImmutableMap.of()),
+            Label.parseAbsolute("//current/package:relative", ImmutableMap.of()),
+            Label.parseAbsolute("//current/package:nocolon", ImmutableMap.of()),
+            Label.parseAbsolute("//current/package:explicit", ImmutableMap.of()),
+            Label.parseAbsolute("//i/was/already/a/label", ImmutableMap.of()));
 
     assertThat(collectLabels(BuildType.LABEL_KEYED_STRING_DICT, input))
         .containsExactlyElementsIn(expected);
@@ -298,7 +319,9 @@
             ImmutableMap.of(
                 RepositoryName.create("@orig_repo"), RepositoryName.create("@new_repo")));
     Label label = BuildType.LABEL.convert("@orig_repo//foo:bar", null, context);
-    assertThat(label).isEquivalentAccordingToCompareTo(Label.parseAbsolute("@new_repo//foo:bar"));
+    assertThat(label)
+        .isEquivalentAccordingToCompareTo(
+            Label.parseAbsolute("@new_repo//foo:bar", ImmutableMap.of()));
   }
 
   /**
@@ -313,10 +336,12 @@
     Selector<Label> selector = new Selector<>(input, null, labelConversionContext, BuildType.LABEL);
     assertThat(selector.getOriginalType()).isEqualTo(BuildType.LABEL);
 
-    Map<Label, Label> expectedMap = ImmutableMap.of(
-        Label.parseAbsolute("//conditions:a"), Label.create("@//a", "a"),
-        Label.parseAbsolute("//conditions:b"), Label.create("@//b", "b"),
-        Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY), Label.create("@//d", "d"));
+    Map<Label, Label> expectedMap =
+        ImmutableMap.of(
+            Label.parseAbsolute("//conditions:a", ImmutableMap.of()), Label.create("@//a", "a"),
+            Label.parseAbsolute("//conditions:b", ImmutableMap.of()), Label.create("@//b", "b"),
+            Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY, ImmutableMap.of()),
+                Label.create("@//d", "d"));
     assertThat(selector.getEntries().entrySet()).containsExactlyElementsIn(expectedMap.entrySet());
   }
 
@@ -382,23 +407,27 @@
     assertThat(selectorList.getOriginalType()).isEqualTo(BuildType.LABEL_LIST);
     assertThat(selectorList.getKeyLabels())
         .containsExactly(
-            Label.parseAbsolute("//conditions:a"),
-            Label.parseAbsolute("//conditions:b"),
-            Label.parseAbsolute("//conditions:c"),
-            Label.parseAbsolute("//conditions:d"));
+            Label.parseAbsolute("//conditions:a", ImmutableMap.of()),
+            Label.parseAbsolute("//conditions:b", ImmutableMap.of()),
+            Label.parseAbsolute("//conditions:c", ImmutableMap.of()),
+            Label.parseAbsolute("//conditions:d", ImmutableMap.of()));
 
     List<Selector<List<Label>>> selectors = selectorList.getSelectors();
     assertThat(selectors.get(0).getEntries().entrySet())
         .containsExactlyElementsIn(
-            ImmutableMap.of(Label.parseAbsolute("//conditions:a"),
-            ImmutableList.of(Label.create("@//a", "a")), Label.parseAbsolute("//conditions:b"),
-            ImmutableList.of(Label.create("@//b", "b")))
+            ImmutableMap.of(
+                    Label.parseAbsolute("//conditions:a", ImmutableMap.of()),
+                    ImmutableList.of(Label.create("@//a", "a")),
+                    Label.parseAbsolute("//conditions:b", ImmutableMap.of()),
+                    ImmutableList.of(Label.create("@//b", "b")))
                 .entrySet());
     assertThat(selectors.get(1).getEntries().entrySet())
         .containsExactlyElementsIn(
             ImmutableMap.of(
-                Label.parseAbsolute("//conditions:c"), ImmutableList.of(Label.create("@//c", "c")),
-                Label.parseAbsolute("//conditions:d"), ImmutableList.of(Label.create("@//d", "d")))
+                    Label.parseAbsolute("//conditions:c", ImmutableMap.of()),
+                        ImmutableList.of(Label.create("@//c", "c")),
+                    Label.parseAbsolute("//conditions:d", ImmutableMap.of()),
+                        ImmutableList.of(Label.create("@//d", "d")))
                 .entrySet());
   }
 
@@ -495,9 +524,10 @@
     assertThat(((Selector<Label>) selectorList.getSelectors().get(0)).getEntries().entrySet())
         .containsExactlyElementsIn(
             ImmutableMap.of(
-                    Label.parseAbsolute("//conditions:a"),
+                    Label.parseAbsolute("//conditions:a", ImmutableMap.of()),
                     expectedLabels,
-                    Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY),
+                    Label.parseAbsolute(
+                        BuildType.Selector.DEFAULT_CONDITION_KEY, ImmutableMap.of()),
                     expectedLabels)
                 .entrySet());
   }
@@ -523,10 +553,13 @@
    */
   @Test
   public void testReservedKeyLabels() throws Exception {
-    assertThat(BuildType.Selector.isReservedLabel(Label.parseAbsolute("//condition:a"))).isFalse();
     assertThat(
             BuildType.Selector.isReservedLabel(
-                Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY)))
+                Label.parseAbsolute("//condition:a", ImmutableMap.of())))
+        .isFalse();
+    assertThat(
+            BuildType.Selector.isReservedLabel(
+                Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY, ImmutableMap.of())))
         .isTrue();
   }
 
@@ -565,7 +598,7 @@
   private static FilesetEntry makeFilesetEntry() {
     try {
       return new FilesetEntry(
-          /* srcLabel */ Label.parseAbsolute("//foo:bar"),
+          /* srcLabel */ Label.parseAbsolute("//foo:bar", ImmutableMap.of()),
           /* files */ ImmutableList.<Label>of(),
           /* excludes */ ImmutableSet.of("xyz"),
           /* destDir */ null,
@@ -595,7 +628,7 @@
   private FilesetEntry createTestFilesetEntry(
       FilesetEntry.SymlinkBehavior symlinkBehavior)
       throws LabelSyntaxException {
-    Label label = Label.parseAbsolute("//x");
+    Label label = Label.parseAbsolute("//x", ImmutableMap.of());
     return new FilesetEntry(
         /* srcLabel */ label,
         /* files */ Arrays.asList(label),
@@ -632,7 +665,7 @@
   }
 
   private FilesetEntry createStripPrefixFilesetEntry(String stripPrefix)  throws Exception {
-    Label label = Label.parseAbsolute("//x");
+    Label label = Label.parseAbsolute("//x", ImmutableMap.of());
     return new FilesetEntry(
         /* srcLabel */ label,
         /* files */ Arrays.asList(label),
@@ -657,23 +690,25 @@
   @Test
   public void testPrintFilesetEntry() throws Exception {
     assertThat(
-        Printer.repr(
-            new FilesetEntry(
-                /* srcLabel */ Label.parseAbsolute("//foo:BUILD"),
-                /* files */ ImmutableList.of(Label.parseAbsolute("//foo:bar")),
-                /* excludes */ ImmutableSet.of("baz"),
-                /* destDir */ "qux",
-                /* symlinkBehavior */ FilesetEntry.SymlinkBehavior.DEREFERENCE,
-                /* stripPrefix */ "blah")))
+            Printer.repr(
+                new FilesetEntry(
+                    /* srcLabel */ Label.parseAbsolute("//foo:BUILD", ImmutableMap.of()),
+                    /* files */ ImmutableList.of(
+                        Label.parseAbsolute("//foo:bar", ImmutableMap.of())),
+                    /* excludes */ ImmutableSet.of("baz"),
+                    /* destDir */ "qux",
+                    /* symlinkBehavior */ FilesetEntry.SymlinkBehavior.DEREFERENCE,
+                    /* stripPrefix */ "blah")))
         .isEqualTo(
-            Joiner.on(" ").join(
-                ImmutableList.of(
-                    "FilesetEntry(srcdir = \"//foo:BUILD\",",
-                    "files = [\"//foo:bar\"],",
-                    "excludes = [\"baz\"],",
-                    "destdir = \"qux\",",
-                    "strip_prefix = \"blah\",",
-                    "symlinks = \"dereference\")")));
+            Joiner.on(" ")
+                .join(
+                    ImmutableList.of(
+                        "FilesetEntry(srcdir = \"//foo:BUILD\",",
+                        "files = [\"//foo:bar\"],",
+                        "excludes = [\"baz\"],",
+                        "destdir = \"qux\",",
+                        "strip_prefix = \"blah\",",
+                        "symlinks = \"dereference\")")));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/packages/EnvironmentGroupTest.java b/src/test/java/com/google/devtools/build/lib/packages/EnvironmentGroupTest.java
index 7a839a1..b2e4aec 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/EnvironmentGroupTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/EnvironmentGroupTest.java
@@ -15,6 +15,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.PackageIdentifier;
@@ -61,33 +62,42 @@
     assertThat(group.getEnvironments())
         .isEqualTo(
             ImmutableSet.of(
-                Label.parseAbsolute("//pkg:foo"),
-                Label.parseAbsolute("//pkg:bar"),
-                Label.parseAbsolute("//pkg:baz")));
+                Label.parseAbsolute("//pkg:foo", ImmutableMap.of()),
+                Label.parseAbsolute("//pkg:bar", ImmutableMap.of()),
+                Label.parseAbsolute("//pkg:baz", ImmutableMap.of())));
   }
 
   @Test
   public void defaultsMembership() throws Exception {
-    assertThat(group.getDefaults()).isEqualTo(ImmutableSet.of(Label.parseAbsolute("//pkg:foo")));
+    assertThat(group.getDefaults())
+        .isEqualTo(ImmutableSet.of(Label.parseAbsolute("//pkg:foo", ImmutableMap.of())));
   }
 
   @Test
   public void isDefault() throws Exception {
     EnvironmentLabels unpackedGroup = group.getEnvironmentLabels();
-    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:foo"))).isTrue();
-    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:bar"))).isFalse();
-    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:baz"))).isFalse();
-    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:not_in_group"))).isFalse();
+    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:foo", ImmutableMap.of())))
+        .isTrue();
+    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:bar", ImmutableMap.of())))
+        .isFalse();
+    assertThat(unpackedGroup.isDefault(Label.parseAbsolute("//pkg:baz", ImmutableMap.of())))
+        .isFalse();
+    assertThat(
+            unpackedGroup.isDefault(Label.parseAbsolute("//pkg:not_in_group", ImmutableMap.of())))
+        .isFalse();
   }
 
   @Test
   public void fulfillers() throws Exception {
     EnvironmentLabels unpackedGroup = group.getEnvironmentLabels();
-    assertThat(unpackedGroup.getFulfillers(Label.parseAbsolute("//pkg:baz")))
-        .containsExactly(Label.parseAbsolute("//pkg:foo"), Label.parseAbsolute("//pkg:bar"));
-    assertThat(unpackedGroup.getFulfillers(Label.parseAbsolute("//pkg:bar")))
-        .containsExactly(Label.parseAbsolute("//pkg:foo"));
-    assertThat(unpackedGroup.getFulfillers(Label.parseAbsolute("//pkg:foo"))).isEmpty();
+    assertThat(unpackedGroup.getFulfillers(Label.parseAbsolute("//pkg:baz", ImmutableMap.of())))
+        .containsExactly(
+            Label.parseAbsolute("//pkg:foo", ImmutableMap.of()),
+            Label.parseAbsolute("//pkg:bar", ImmutableMap.of()));
+    assertThat(unpackedGroup.getFulfillers(Label.parseAbsolute("//pkg:bar", ImmutableMap.of())))
+        .containsExactly(Label.parseAbsolute("//pkg:foo", ImmutableMap.of()));
+    assertThat(unpackedGroup.getFulfillers(Label.parseAbsolute("//pkg:foo", ImmutableMap.of())))
+        .isEmpty();
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/packages/ExternalPackageTest.java b/src/test/java/com/google/devtools/build/lib/packages/ExternalPackageTest.java
index 2dba95f..eb416f5 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/ExternalPackageTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/ExternalPackageTest.java
@@ -15,6 +15,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.skyframe.ConfiguredTargetAndData;
@@ -105,6 +106,6 @@
     ConfiguredAttributeMapper configuredAttributeMapper =
         getMapperFromConfiguredTargetAndTarget(ctad);
     assertThat(configuredAttributeMapper.get("runtime_deps", BuildType.LABEL_LIST))
-        .containsExactly(Label.parseAbsolute("//:b"));
+        .containsExactly(Label.parseAbsolute("//:b", ImmutableMap.of()));
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/packages/PackageFactoryTest.java b/src/test/java/com/google/devtools/build/lib/packages/PackageFactoryTest.java
index 5010375..a5c3557 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/PackageFactoryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/PackageFactoryTest.java
@@ -18,6 +18,7 @@
 import static org.junit.Assert.fail;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.eventbus.EventBus;
@@ -581,7 +582,9 @@
 
     assertThat(attributes(pkg.getRule("t1")).get("$implicit_tests", BuildType.LABEL_LIST))
         .containsExactlyElementsIn(
-            Sets.newHashSet(Label.parseAbsolute("//x:c"), Label.parseAbsolute("//x:j")));
+            Sets.newHashSet(
+                Label.parseAbsolute("//x:c", ImmutableMap.of()),
+                Label.parseAbsolute("//x:j", ImmutableMap.of())));
     assertThat(attributes(pkg.getRule("t2")).get("$implicit_tests", BuildType.LABEL_LIST))
         .isEmpty();
     assertThat(attributes(pkg.getRule("t3")).get("$implicit_tests", BuildType.LABEL_LIST))
@@ -604,14 +607,16 @@
     List<Label> yesFiles = attributes(pkg.getRule("yes")).get("srcs", BuildType.LABEL_LIST);
     List<Label> noFiles = attributes(pkg.getRule("no")).get("srcs", BuildType.LABEL_LIST);
 
-    assertThat(yesFiles).containsExactly(
-        Label.parseAbsolute("@//fruit:data/apple"),
-        Label.parseAbsolute("@//fruit:data/pear"));
+    assertThat(yesFiles)
+        .containsExactly(
+            Label.parseAbsolute("@//fruit:data/apple", ImmutableMap.of()),
+            Label.parseAbsolute("@//fruit:data/pear", ImmutableMap.of()));
 
-    assertThat(noFiles).containsExactly(
-        Label.parseAbsolute("@//fruit:data/apple"),
-        Label.parseAbsolute("@//fruit:data/pear"),
-        Label.parseAbsolute("@//fruit:data/berry"));
+    assertThat(noFiles)
+        .containsExactly(
+            Label.parseAbsolute("@//fruit:data/apple", ImmutableMap.of()),
+            Label.parseAbsolute("@//fruit:data/pear", ImmutableMap.of()),
+            Label.parseAbsolute("@//fruit:data/berry", ImmutableMap.of()));
   }
 
   // TODO(bazel-team): This is really a test for GlobCache.
@@ -1032,7 +1037,7 @@
     assertThat(pkg.containsErrors()).isFalse();
     assertThat(pkg.getRule("e")).isNotNull();
     List globList = (List) pkg.getRule("e").getAttributeContainer().getAttr("data");
-    assertThat(globList).containsExactly(Label.parseAbsolute("//e:data.txt"));
+    assertThat(globList).containsExactly(Label.parseAbsolute("//e:data.txt", ImmutableMap.of()));
   }
 
   @Test
@@ -1213,8 +1218,10 @@
             "    default_compatible_with=['//foo'],",
             "    default_restricted_to=['//bar'],",
             ")");
-    assertThat(pkg.getDefaultCompatibleWith()).containsExactly(Label.parseAbsolute("//foo"));
-    assertThat(pkg.getDefaultRestrictedTo()).containsExactly(Label.parseAbsolute("//bar"));
+    assertThat(pkg.getDefaultCompatibleWith())
+        .containsExactly(Label.parseAbsolute("//foo", ImmutableMap.of()));
+    assertThat(pkg.getDefaultRestrictedTo())
+        .containsExactly(Label.parseAbsolute("//bar", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/packages/RuleClassTest.java b/src/test/java/com/google/devtools/build/lib/packages/RuleClassTest.java
index 45d332c..384d2f3 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/RuleClassTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/RuleClassTest.java
@@ -119,7 +119,7 @@
         attr("my-label-attr", LABEL)
             .mandatory()
             .legacyAllowAnyFileType()
-            .value(Label.parseAbsolute("//default:label"))
+            .value(Label.parseAbsolute("//default:label", ImmutableMap.of()))
             .build(),
         attr("my-labellist-attr", LABEL_LIST).mandatory().legacyAllowAnyFileType().build(),
         attr("my-integer-attr", INTEGER).value(42).build(),
@@ -188,7 +188,7 @@
     // default based on type
     assertThat(ruleClassA.getAttribute(0).getDefaultValue(null)).isEqualTo("");
     assertThat(ruleClassA.getAttribute(1).getDefaultValue(null))
-        .isEqualTo(Label.parseAbsolute("//default:label"));
+        .isEqualTo(Label.parseAbsolute("//default:label", ImmutableMap.of()));
     assertThat(ruleClassA.getAttribute(2).getDefaultValue(null)).isEqualTo(Collections.emptyList());
     assertThat(ruleClassA.getAttribute(3).getDefaultValue(null)).isEqualTo(42);
     // default explicitly specified
@@ -1039,13 +1039,15 @@
             .add(attr("tags", STRING_LIST));
 
     ruleClassBuilder.addRequiredToolchains(
-        Label.parseAbsolute("//toolchain:tc1"), Label.parseAbsolute("//toolchain:tc2"));
+        Label.parseAbsolute("//toolchain:tc1", ImmutableMap.of()),
+        Label.parseAbsolute("//toolchain:tc2", ImmutableMap.of()));
 
     RuleClass ruleClass = ruleClassBuilder.build();
 
     assertThat(ruleClass.getRequiredToolchains())
         .containsExactly(
-            Label.parseAbsolute("//toolchain:tc1"), Label.parseAbsolute("//toolchain:tc2"));
+            Label.parseAbsolute("//toolchain:tc1", ImmutableMap.of()),
+            Label.parseAbsolute("//toolchain:tc2", ImmutableMap.of()));
   }
 
   @Test
@@ -1057,13 +1059,15 @@
             .executionPlatformConstraintsAllowed(ExecutionPlatformConstraintsAllowed.PER_RULE);
 
     ruleClassBuilder.addExecutionPlatformConstraints(
-        Label.parseAbsolute("//constraints:cv1"), Label.parseAbsolute("//constraints:cv2"));
+        Label.parseAbsolute("//constraints:cv1", ImmutableMap.of()),
+        Label.parseAbsolute("//constraints:cv2", ImmutableMap.of()));
 
     RuleClass ruleClass = ruleClassBuilder.build();
 
     assertThat(ruleClass.getExecutionPlatformConstraints())
         .containsExactly(
-            Label.parseAbsolute("//constraints:cv1"), Label.parseAbsolute("//constraints:cv2"));
+            Label.parseAbsolute("//constraints:cv1", ImmutableMap.of()),
+            Label.parseAbsolute("//constraints:cv2", ImmutableMap.of()));
     assertThat(ruleClass.hasAttr("exec_compatible_with", LABEL_LIST)).isFalse();
   }
 
@@ -1091,7 +1095,8 @@
             .add(attr("tags", STRING_LIST))
             .executionPlatformConstraintsAllowed(ExecutionPlatformConstraintsAllowed.PER_RULE)
             .addExecutionPlatformConstraints(
-                Label.parseAbsolute("//constraints:cv1"), Label.parseAbsolute("//constraints:cv2"))
+                Label.parseAbsolute("//constraints:cv1", ImmutableMap.of()),
+                Label.parseAbsolute("//constraints:cv2", ImmutableMap.of()))
             .build();
 
     RuleClass childRuleClass =
@@ -1101,7 +1106,8 @@
 
     assertThat(childRuleClass.getExecutionPlatformConstraints())
         .containsExactly(
-            Label.parseAbsolute("//constraints:cv1"), Label.parseAbsolute("//constraints:cv2"));
+            Label.parseAbsolute("//constraints:cv1", ImmutableMap.of()),
+            Label.parseAbsolute("//constraints:cv2", ImmutableMap.of()));
     assertThat(childRuleClass.hasAttr("exec_compatible_with", LABEL_LIST)).isFalse();
   }
 
@@ -1117,13 +1123,15 @@
             .factory(DUMMY_CONFIGURED_TARGET_FACTORY)
             .executionPlatformConstraintsAllowed(ExecutionPlatformConstraintsAllowed.PER_RULE)
             .addExecutionPlatformConstraints(
-                Label.parseAbsolute("//constraints:cv1"), Label.parseAbsolute("//constraints:cv2"));
+                Label.parseAbsolute("//constraints:cv1", ImmutableMap.of()),
+                Label.parseAbsolute("//constraints:cv2", ImmutableMap.of()));
 
     RuleClass childRuleClass = childRuleClassBuilder.build();
 
     assertThat(childRuleClass.getExecutionPlatformConstraints())
         .containsExactly(
-            Label.parseAbsolute("//constraints:cv1"), Label.parseAbsolute("//constraints:cv2"));
+            Label.parseAbsolute("//constraints:cv1", ImmutableMap.of()),
+            Label.parseAbsolute("//constraints:cv2", ImmutableMap.of()));
     assertThat(childRuleClass.hasAttr("exec_compatible_with", LABEL_LIST)).isFalse();
   }
 
diff --git a/src/test/java/com/google/devtools/build/lib/packages/RuleFactoryTest.java b/src/test/java/com/google/devtools/build/lib/packages/RuleFactoryTest.java
index 3c78b8e..c806d0f 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/RuleFactoryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/RuleFactoryTest.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertWithMessage;
 import static org.junit.Assert.fail;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.eventbus.EventBus;
@@ -76,7 +77,7 @@
 
     assertThat(pkg.getTarget("foo")).isSameAs(rule);
 
-    assertThat(rule.getLabel()).isEqualTo(Label.parseAbsolute("//mypkg:foo"));
+    assertThat(rule.getLabel()).isEqualTo(Label.parseAbsolute("//mypkg:foo", ImmutableMap.of()));
     assertThat(rule.getName()).isEqualTo("foo");
 
     assertThat(rule.getRuleClass()).isEqualTo("cc_library");
diff --git a/src/test/java/com/google/devtools/build/lib/packages/SkylarkProviderTest.java b/src/test/java/com/google/devtools/build/lib/packages/SkylarkProviderTest.java
index a4cb31a..0c81e9b 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/SkylarkProviderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/SkylarkProviderTest.java
@@ -48,7 +48,8 @@
 
   @Test
   public void exportedProvider_Accessors() throws Exception {
-    SkylarkKey key = new SkylarkKey(Label.parseAbsolute("//foo:bar.bzl"), "prov");
+    SkylarkKey key =
+        new SkylarkKey(Label.parseAbsolute("//foo:bar.bzl", ImmutableMap.of()), "prov");
     SkylarkProvider provider = SkylarkProvider.createExportedSchemaless(key, /*location=*/ null);
     assertThat(provider.isExported()).isTrue();
     assertThat(provider.getName()).isEqualTo("prov");
@@ -93,10 +94,14 @@
   @Test
   public void providerEquals() throws Exception {
     // All permutations of differing label and differing name.
-    SkylarkKey keyFooA = new SkylarkKey(Label.parseAbsolute("//foo.bzl"), "provA");
-    SkylarkKey keyFooB = new SkylarkKey(Label.parseAbsolute("//foo.bzl"), "provB");
-    SkylarkKey keyBarA = new SkylarkKey(Label.parseAbsolute("//bar.bzl"), "provA");
-    SkylarkKey keyBarB = new SkylarkKey(Label.parseAbsolute("//bar.bzl"), "provB");
+    SkylarkKey keyFooA =
+        new SkylarkKey(Label.parseAbsolute("//foo.bzl", ImmutableMap.of()), "provA");
+    SkylarkKey keyFooB =
+        new SkylarkKey(Label.parseAbsolute("//foo.bzl", ImmutableMap.of()), "provB");
+    SkylarkKey keyBarA =
+        new SkylarkKey(Label.parseAbsolute("//bar.bzl", ImmutableMap.of()), "provA");
+    SkylarkKey keyBarB =
+        new SkylarkKey(Label.parseAbsolute("//bar.bzl", ImmutableMap.of()), "provB");
 
     // 1 for each key, plus a duplicate for one of the keys, plus 2 that have no key.
     SkylarkProvider provFooA1 =
diff --git a/src/test/java/com/google/devtools/build/lib/packages/util/PackageLoadingTestCase.java b/src/test/java/com/google/devtools/build/lib/packages/util/PackageLoadingTestCase.java
index 58107d0..88a02fb 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/util/PackageLoadingTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/util/PackageLoadingTestCase.java
@@ -207,7 +207,7 @@
   protected Target getTarget(String label)
       throws NoSuchPackageException, NoSuchTargetException,
       LabelSyntaxException, InterruptedException {
-    return getTarget(Label.parseAbsolute(label));
+    return getTarget(Label.parseAbsolute(label, ImmutableMap.of()));
   }
 
   protected Target getTarget(Label label)
@@ -290,7 +290,7 @@
   public static Set<Label> asLabelSet(Iterable<String> strings) throws LabelSyntaxException {
     Set<Label> result = Sets.newTreeSet();
     for (String s : strings) {
-      result.add(Label.parseAbsolute(s));
+      result.add(Label.parseAbsolute(s, ImmutableMap.of()));
     }
     return result;
   }
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/AbstractTargetPatternEvaluatorTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/AbstractTargetPatternEvaluatorTest.java
index 8542447..1bc7460 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/AbstractTargetPatternEvaluatorTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/AbstractTargetPatternEvaluatorTest.java
@@ -15,13 +15,13 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
 import com.google.devtools.build.lib.cmdline.ResolvedTargets;
 import com.google.devtools.build.lib.cmdline.TargetParsingException;
 import com.google.devtools.build.lib.events.DelegatingEventHandler;
 import com.google.devtools.build.lib.events.ExtendedEventHandler;
-import com.google.devtools.build.lib.events.ExtendedEventHandler.Postable;
 import com.google.devtools.build.lib.packages.ConstantRuleVisibility;
 import com.google.devtools.build.lib.packages.Target;
 import com.google.devtools.build.lib.packages.util.PackageLoadingTestCase;
@@ -109,7 +109,7 @@
   protected static Set<Label> labels(String... labelStrings) throws LabelSyntaxException {
     Set<Label> labels = new HashSet<>();
     for (String labelString : labelStrings) {
-      labels.add(Label.parseAbsolute(labelString));
+      labels.add(Label.parseAbsolute(labelString, ImmutableMap.of()));
     }
     return labels;
   }
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/CompileOneDependencyTransformerTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/CompileOneDependencyTransformerTest.java
index 3c3a773..a2e6d3d 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/CompileOneDependencyTransformerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/CompileOneDependencyTransformerTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 import static org.junit.Assert.fail;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
 import com.google.devtools.build.lib.cmdline.ResolvedTargets;
@@ -67,7 +68,7 @@
   private static Set<Label> labels(String... labelStrings) throws LabelSyntaxException {
     Set<Label> labels = new HashSet<>();
     for (String labelString : labelStrings) {
-      labels.add(Label.parseAbsolute(labelString));
+      labels.add(Label.parseAbsolute(labelString, ImmutableMap.of()));
     }
     return labels;
   }
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java
index 40324ad..de8e71b 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/IOExceptionsTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.base.Function;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.devtools.build.lib.clock.BlazeClock;
 import com.google.devtools.build.lib.cmdline.Label;
@@ -107,7 +108,7 @@
         return null;
       }
     };
-    assertThat(visitTransitively(Label.parseAbsolute("//pkg:x"))).isFalse();
+    assertThat(visitTransitively(Label.parseAbsolute("//pkg:x", ImmutableMap.of()))).isFalse();
     scratch.overwriteFile("pkg/BUILD",
         "# another comment to force reload",
         "sh_library(name = 'x')");
@@ -115,7 +116,7 @@
     syncPackages();
     eventCollector.clear();
     reporter.addHandler(failFastHandler);
-    assertThat(visitTransitively(Label.parseAbsolute("//pkg:x"))).isTrue();
+    assertThat(visitTransitively(Label.parseAbsolute("//pkg:x", ImmutableMap.of()))).isTrue();
     assertNoEvents();
   }
 
@@ -136,7 +137,7 @@
         return null;
       }
     };
-    assertThat(visitTransitively(Label.parseAbsolute("//top:top"))).isFalse();
+    assertThat(visitTransitively(Label.parseAbsolute("//top:top", ImmutableMap.of()))).isFalse();
     assertContainsEvent("no such package 'pkg'");
     // The traditional label visitor does not propagate the original IOException message.
     // assertContainsEvent("custom crash");
@@ -150,7 +151,7 @@
     syncPackages();
     eventCollector.clear();
     reporter.addHandler(failFastHandler);
-    assertThat(visitTransitively(Label.parseAbsolute("//top:top"))).isTrue();
+    assertThat(visitTransitively(Label.parseAbsolute("//top:top", ImmutableMap.of()))).isTrue();
     assertNoEvents();
   }
 
@@ -169,6 +170,6 @@
         return null;
       }
     };
-    assertThat(visitTransitively(Label.parseAbsolute("//top/pkg:x"))).isFalse();
+    assertThat(visitTransitively(Label.parseAbsolute("//top/pkg:x", ImmutableMap.of()))).isFalse();
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
index 32aacda..866844d 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
@@ -352,7 +352,7 @@
     Target target = tester.getTarget("//e:e");
     assertThat(((Rule) target).containsErrors()).isFalse();
     List<?> globList = (List<?>) ((Rule) target).getAttributeContainer().getAttr("data");
-    assertThat(globList).containsExactly(Label.parseAbsolute("//e:data.txt"));
+    assertThat(globList).containsExactly(Label.parseAbsolute("//e:data.txt", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java
index df3c5c8..461b210 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java
@@ -194,7 +194,7 @@
   }
 
   private Target getTarget(String label) throws Exception {
-    return getTarget(Label.parseAbsolute(label));
+    return getTarget(Label.parseAbsolute(label, ImmutableMap.of()));
   }
 
   private void createPkg1() throws IOException {
@@ -245,7 +245,7 @@
   @Test
   public void testGetTarget() throws Exception {
     createPkg1();
-    Label label = Label.parseAbsolute("//pkg1:foo");
+    Label label = Label.parseAbsolute("//pkg1:foo", ImmutableMap.of());
     Target target = getTarget(label);
     assertThat(target.getLabel()).isEqualTo(label);
   }
@@ -403,7 +403,7 @@
   }
 
   private void assertLabelValidity(boolean expected, String labelString) throws Exception {
-    Label label = Label.parseAbsolute(labelString);
+    Label label = Label.parseAbsolute(labelString, ImmutableMap.of());
 
     boolean actual = false;
     String error = null;
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluatorTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluatorTest.java
index 94029ac..502e90c 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluatorTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluatorTest.java
@@ -18,6 +18,7 @@
 import static org.junit.Assert.fail;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
@@ -484,16 +485,20 @@
 
   @Test
   public void testParsesIterableOfLabels() throws Exception {
-    Set<Label> labels = Sets.newHashSet(Label.parseAbsolute("//foo/bar:bar1"),
-        Label.parseAbsolute("//foo:foo1"));
+    Set<Label> labels =
+        Sets.newHashSet(
+            Label.parseAbsolute("//foo/bar:bar1", ImmutableMap.of()),
+            Label.parseAbsolute("//foo:foo1", ImmutableMap.of()));
     assertThat(parseList("//foo/bar:bar1", "//foo:foo1")).isEqualTo(labels);
     parsingListener.assertEmpty();
   }
 
   @Test
   public void testParseAbsoluteWithRelativeParser() throws Exception {
-    Set<Label> labels = Sets.newHashSet(Label.parseAbsolute("//foo/bar:bar1"),
-        Label.parseAbsolute("//foo:foo1"));
+    Set<Label> labels =
+        Sets.newHashSet(
+            Label.parseAbsolute("//foo/bar:bar1", ImmutableMap.of()),
+            Label.parseAbsolute("//foo:foo1", ImmutableMap.of()));
     assertThat(parseListRelative("//foo/bar:bar1", "//foo:foo1")).isEqualTo(labels);
     parsingListener.assertEmpty();
   }
@@ -519,7 +524,8 @@
     scratch.file("x/y/BUILD", "cc_library(name='y')");
     scratch.file("x/z/BUILD", "cc_library(name='z')");
     setDeletedPackages(Sets.newHashSet(PackageIdentifier.createInMainRepo("x/y")));
-    assertThat(parseList("x/...")).isEqualTo(Sets.newHashSet(Label.parseAbsolute("//x/z")));
+    assertThat(parseList("x/..."))
+        .isEqualTo(Sets.newHashSet(Label.parseAbsolute("//x/z", ImmutableMap.of())));
   }
 
   @Test
@@ -529,14 +535,15 @@
     setDeletedPackages(Sets.newHashSet(PackageIdentifier.createInMainRepo("x/y")));
 
     assertThat(
-            targetsToLabels(getFailFast(
-                parseTargetPatternList(
-                    PathFragment.create("x"),
-                    parser,
-                    parsingListener,
-                    ImmutableList.of("..."),
-                    false))))
-        .isEqualTo(Sets.newHashSet(Label.parseAbsolute("//x/z")));
+            targetsToLabels(
+                getFailFast(
+                    parseTargetPatternList(
+                        PathFragment.create("x"),
+                        parser,
+                        parsingListener,
+                        ImmutableList.of("..."),
+                        false))))
+        .isEqualTo(Sets.newHashSet(Label.parseAbsolute("//x/z", ImmutableMap.of())));
   }
 
   @Test
@@ -544,15 +551,19 @@
     scratch.file("x/y/BUILD", "cc_library(name='y')");
     scratch.file("x/z/BUILD", "cc_library(name='z')");
 
-    assertThat(parseList("x/...")).containsExactly(
-        Label.parseAbsolute("//x/y"), Label.parseAbsolute("//x/z"));
+    assertThat(parseList("x/..."))
+        .containsExactly(
+            Label.parseAbsolute("//x/y", ImmutableMap.of()),
+            Label.parseAbsolute("//x/z", ImmutableMap.of()));
 
     setDeletedPackages(Sets.newHashSet(PackageIdentifier.createInMainRepo("x/y")));
-    assertThat(parseList("x/...")).containsExactly(Label.parseAbsolute("//x/z"));
+    assertThat(parseList("x/...")).containsExactly(Label.parseAbsolute("//x/z", ImmutableMap.of()));
 
     setDeletedPackages(ImmutableSet.<PackageIdentifier>of());
-    assertThat(parseList("x/...")).containsExactly(
-        Label.parseAbsolute("//x/y"), Label.parseAbsolute("//x/z"));
+    assertThat(parseList("x/..."))
+        .containsExactly(
+            Label.parseAbsolute("//x/y", ImmutableMap.of()),
+            Label.parseAbsolute("//x/z", ImmutableMap.of()));
   }
 
   @Test
@@ -648,7 +659,8 @@
     // We make sure that the parent package is present, so that in the subsequent nokeep_going
     // build, the pattern parsing will have as many of its deps available as possible, which
     // exercises more code coverage during error bubbling.
-    assertThat(parseList("//parent:all")).containsExactly(Label.parseAbsolute("//parent:parent"));
+    assertThat(parseList("//parent:all"))
+        .containsExactly(Label.parseAbsolute("//parent:parent", ImmutableMap.of()));
     try {
       parseList("//parent/...");
       fail();
@@ -821,7 +833,9 @@
     assertContainsEvent("name 'BROKEN' is not defined");
     assertThat(result.first)
         .containsExactlyElementsIn(
-            Sets.newHashSet(Label.parseAbsolute("//x/y:a"), Label.parseAbsolute("//x/y:b")));
+            Sets.newHashSet(
+                Label.parseAbsolute("//x/y:a", ImmutableMap.of()),
+                Label.parseAbsolute("//x/y:b", ImmutableMap.of())));
     assertThat(result.second).isFalse();
   }
 
@@ -907,7 +921,7 @@
         "genrule(name='c', outs=['c.out'])");
 
     Pair<Set<Label>, Boolean> result = parseListKeepGoing("//loading:y");
-    assertThat(result.first).containsExactly(Label.parseAbsolute("//loading:y"));
+    assertThat(result.first).containsExactly(Label.parseAbsolute("//loading:y", ImmutableMap.of()));
     assertContainsEvent("missing value for mandatory attribute");
     assertThat(result.second).isFalse();
   }
@@ -947,8 +961,10 @@
         .modify(PathFragment.create("h/i/j/BUILD")).build();
     invalidate(modifiedFileSet);
 
-    assertThat(parseList("//h/...")).containsExactly(Label.parseAbsolute("//h/i/j:j"),
-        Label.parseAbsolute("//h"));
+    assertThat(parseList("//h/..."))
+        .containsExactly(
+            Label.parseAbsolute("//h/i/j:j", ImmutableMap.of()),
+            Label.parseAbsolute("//h", ImmutableMap.of()));
   }
 
   @Test
@@ -974,7 +990,8 @@
     invalidate(modifiedFileSet);
     reporter.addHandler(failFastHandler);
     Set<Label> nonEmptyResult = parseList("//h/...");
-    assertThat(nonEmptyResult).containsExactly(Label.parseAbsolute("//h/i/j/k:l"));
+    assertThat(nonEmptyResult)
+        .containsExactly(Label.parseAbsolute("//h/i/j/k:l", ImmutableMap.of()));
   }
 
   @Test
@@ -999,8 +1016,10 @@
     reporter.addHandler(failFastHandler);
     Set<Label> result = parseList("//t/...");
 
-    assertThat(result).containsExactly(Label.parseAbsolute("//t:t"),
-        Label.parseAbsolute("//t/u/v:t"));
+    assertThat(result)
+        .containsExactly(
+            Label.parseAbsolute("//t:t", ImmutableMap.of()),
+            Label.parseAbsolute("//t/u/v:t", ImmutableMap.of()));
   }
 
   @Test
@@ -1011,8 +1030,8 @@
     scratch.file("a/b/BUILD", "filegroup(name='g')");
     ResolvedTargets<Target> result = parseTargetPatternList(parser, parsingListener,
         ImmutableList.of("//a/b/..."), true);
-    assertThat(targetsToLabels(result.getTargets())).containsExactly(
-        Label.parseAbsolute("//a/b:g"));
+    assertThat(targetsToLabels(result.getTargets()))
+        .containsExactly(Label.parseAbsolute("//a/b:g", ImmutableMap.of()));
   }
 
   @Test
@@ -1023,8 +1042,8 @@
     scratch.file("a/b/BUILD", "filegroup(name='g')");
     ResolvedTargets<Target> result = parseTargetPatternList(parser, parsingListener,
         ImmutableList.of("//a/b/..."), true);
-    assertThat(targetsToLabels(result.getTargets())).contains(
-        Label.parseAbsolute("//a/b:g"));
+    assertThat(targetsToLabels(result.getTargets()))
+        .contains(Label.parseAbsolute("//a/b:g", ImmutableMap.of()));
   }
 
   @Test
@@ -1043,9 +1062,10 @@
     ac.getChild("symlink").createSymbolicLink(PathFragment.create("../../from-c"));
     ResolvedTargets<Target> result = parseTargetPatternList(parser, parsingListener,
         ImmutableList.of("//a/..."), true);
-    assertThat(targetsToLabels(result.getTargets())).containsExactly(
-        Label.parseAbsolute("//a/c/symlink:from-c"),
-        Label.parseAbsolute("//a/b/not-a-symlink:not-a-symlink"));
+    assertThat(targetsToLabels(result.getTargets()))
+        .containsExactly(
+            Label.parseAbsolute("//a/c/symlink:from-c", ImmutableMap.of()),
+            Label.parseAbsolute("//a/b/not-a-symlink:not-a-symlink", ImmutableMap.of()));
   }
 
   @Test
@@ -1057,8 +1077,8 @@
     d.getChild("c").createSymbolicLink(targetFragment);
     rootDirectory.getChild("convenience").createSymbolicLink(targetFragment);
     Set<Label> result = parseList("//...");
-    assertThat(result).doesNotContain(Label.parseAbsolute("//convenience:c"));
-    assertThat(result).doesNotContain(Label.parseAbsolute("//d/c:c"));
+    assertThat(result).doesNotContain(Label.parseAbsolute("//convenience:c", ImmutableMap.of()));
+    assertThat(result).doesNotContain(Label.parseAbsolute("//d/c:c", ImmutableMap.of()));
   }
 
   @Test
@@ -1069,13 +1089,13 @@
   @Test
   public void testTopLevelPackage_Relative_BuildFile() throws Exception {
     Set<Label> result = parseList("BUILD");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:BUILD"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:BUILD", ImmutableMap.of()));
   }
 
   @Test
   public void testTopLevelPackage_Relative_DeclaredTarget() throws Exception {
     Set<Label> result = parseList("fg");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:fg"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:fg", ImmutableMap.of()));
   }
 
   @Test
@@ -1086,13 +1106,13 @@
   @Test
   public void testTopLevelPackage_Relative_ColonAll() throws Exception {
     Set<Label> result = parseList(":all");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:fg"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:fg", ImmutableMap.of()));
   }
 
   @Test
   public void testTopLevelPackage_Relative_InputFile() throws Exception {
     Set<Label> result = parseList("foo.cc");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:foo.cc"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:foo.cc", ImmutableMap.of()));
   }
 
   @Test
@@ -1103,25 +1123,25 @@
   @Test
   public void testTopLevelPackage_Absolute_BuildFile() throws Exception {
     Set<Label> result = parseList("//:BUILD");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:BUILD"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:BUILD", ImmutableMap.of()));
   }
 
   @Test
   public void testTopLevelPackage_Absolute_DeclaredTarget() throws Exception {
     Set<Label> result = parseList("//:fg");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:fg"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:fg", ImmutableMap.of()));
   }
 
   @Test
   public void testTopLevelPackage_Absolute_All() throws Exception {
     Set<Label> result = parseList("//:all");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:fg"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:fg", ImmutableMap.of()));
   }
 
   @Test
   public void testTopLevelPackage_Absolute_InputFile() throws Exception {
     Set<Label> result = parseList("//:foo.cc");
-    assertThat(result).containsExactly(Label.parseAbsolute("//:foo.cc"));
+    assertThat(result).containsExactly(Label.parseAbsolute("//:foo.cc", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java
index e7cd803..82b9455 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AarImportTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.base.Predicates;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.Action;
 import com.google.devtools.build.lib.actions.Artifact;
@@ -575,6 +576,8 @@
   @Test
   public void testTransitiveExports() throws Exception {
     assertThat(getConfiguredTarget("//a:bar").get(JavaInfo.PROVIDER).getTransitiveExports())
-        .containsExactly(Label.parseAbsolute("//a:foo"), Label.parseAbsolute("//java:baz"));
+        .containsExactly(
+            Label.parseAbsolute("//a:foo", ImmutableMap.of()),
+            Label.parseAbsolute("//java:baz", ImmutableMap.of()));
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java
index 4f44f85..9e6f5f8 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidLibraryTest.java
@@ -22,6 +22,7 @@
 import com.google.common.base.Joiner;
 import com.google.common.base.Splitter;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.truth.Truth;
@@ -478,9 +479,11 @@
     ConfiguredTarget target = getConfiguredTarget("//java/com/google/exports:dummy");
     List<Label> exports = ImmutableList.copyOf(
         target.getProvider(JavaExportsProvider.class).getTransitiveExports());
-    assertThat(exports).containsExactly(Label.parseAbsolute("//java/com/google/exports:dummy2"),
-        Label.parseAbsolute("//java/com/google/exports:dummy3"),
-        Label.parseAbsolute("//java/com/google/exports:dummy4"));
+    assertThat(exports)
+        .containsExactly(
+            Label.parseAbsolute("//java/com/google/exports:dummy2", ImmutableMap.of()),
+            Label.parseAbsolute("//java/com/google/exports:dummy3", ImmutableMap.of()),
+            Label.parseAbsolute("//java/com/google/exports:dummy4", ImmutableMap.of()));
     assertNoEvents();
   }
 
@@ -943,22 +946,22 @@
             Iterables.transform(
                 foo.get(AndroidResourcesInfo.PROVIDER).getTransitiveAndroidResources(), getLabel))
         .containsExactly(
-            Label.parseAbsolute("//java/apps/android:lib"),
-            Label.parseAbsolute("//java/apps/android:bar"));
+            Label.parseAbsolute("//java/apps/android:lib", ImmutableMap.of()),
+            Label.parseAbsolute("//java/apps/android:bar", ImmutableMap.of()));
     assertThat(
             Iterables.transform(
                 foo.get(AndroidResourcesInfo.PROVIDER).getDirectAndroidResources(), getLabel))
-        .containsExactly(Label.parseAbsolute("//java/apps/android:foo"));
+        .containsExactly(Label.parseAbsolute("//java/apps/android:foo", ImmutableMap.of()));
 
     ConfiguredTarget lib = getConfiguredTarget("//java/apps/android:lib");
     assertThat(
             Iterables.transform(
                 lib.get(AndroidResourcesInfo.PROVIDER).getTransitiveAndroidResources(), getLabel))
-        .containsExactly(Label.parseAbsolute("//java/apps/android:bar"));
+        .containsExactly(Label.parseAbsolute("//java/apps/android:bar", ImmutableMap.of()));
     assertThat(
             Iterables.transform(
                 lib.get(AndroidResourcesInfo.PROVIDER).getDirectAndroidResources(), getLabel))
-        .containsExactly(Label.parseAbsolute("//java/apps/android:lib"));
+        .containsExactly(Label.parseAbsolute("//java/apps/android:lib", ImmutableMap.of()));
 
     ConfiguredTarget libNeverlink = getConfiguredTarget("//java/apps/android:lib_neverlink");
     assertThat(libNeverlink.get(AndroidResourcesInfo.PROVIDER).getTransitiveAndroidResources())
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidMultidexBaseTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidMultidexBaseTest.java
index 85a842f..ef53ebd 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidMultidexBaseTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidMultidexBaseTest.java
@@ -17,6 +17,7 @@
 import static com.google.devtools.build.lib.actions.util.ActionsTestUtil.getFirstArtifactEndingWith;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.actions.Artifact;
 import com.google.devtools.build.lib.analysis.ConfiguredTarget;
 import com.google.devtools.build.lib.analysis.actions.SpawnAction;
@@ -65,7 +66,7 @@
     // Only created in legacy mode:
     Artifact strippedJar = getFirstArtifactEndingWith(artifacts, "main_dex_intermediate.jar");
     Artifact mainDexList = getFirstArtifactEndingWith(artifacts, "main_dex_list.txt");
-    String ruleName = Label.parseAbsolute(ruleLabel).getName();
+    String ruleName = Label.parseAbsolute(ruleLabel, ImmutableMap.of()).getName();
     Artifact mainDexProguardSpec = getFirstArtifactEndingWith(
         artifacts, "main_dex_" + ruleName + "_proguard.cfg");
 
diff --git a/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagOptionsTest.java b/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagOptionsTest.java
index 2bc8b30..a744b6e 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagOptionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagOptionsTest.java
@@ -256,71 +256,88 @@
             // Empty with all flags trimmed
             getOptionsAndTrim(ImmutableMap.of(), ImmutableSet.of()),
             getOptionsAndTrim(
-                ImmutableMap.of(Label.parseAbsolute("//a:a"), "a"), ImmutableSet.of()),
+                ImmutableMap.of(Label.parseAbsolute("//a:a", ImmutableMap.of()), "a"),
+                ImmutableSet.of()),
             getOptionsAndTrim(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//a:a"), "a", Label.parseAbsolute("//b:b"), "b"),
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()),
+                    "a",
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()),
+                    "b"),
                 ImmutableSet.of()))
         .addEqualityGroup(
             // Only //a:a => a, others default
-            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//a:a"), "a")),
-            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//a:a"), "a")))
+            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//a:a", ImmutableMap.of()), "a")),
+            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//a:a", ImmutableMap.of()), "a")))
         .addEqualityGroup(
             // Error: //a:a is absent
-            getOptionsAndTrim(ImmutableMap.of(), ImmutableSet.of(Label.parseAbsolute("//a:a"))),
             getOptionsAndTrim(
-                ImmutableMap.of(Label.parseAbsolute("//b:b"), "b"),
-                ImmutableSet.of(Label.parseAbsolute("//a:a"))))
+                ImmutableMap.of(),
+                ImmutableSet.of(Label.parseAbsolute("//a:a", ImmutableMap.of()))),
+            getOptionsAndTrim(
+                ImmutableMap.of(Label.parseAbsolute("//b:b", ImmutableMap.of()), "b"),
+                ImmutableSet.of(Label.parseAbsolute("//a:a", ImmutableMap.of()))))
         .addEqualityGroup(
             // Only //a:a => a, others trimmed
             getOptionsAndTrim(
-                ImmutableMap.of(Label.parseAbsolute("//a:a"), "a"),
-                ImmutableSet.of(Label.parseAbsolute("//a:a"))),
+                ImmutableMap.of(Label.parseAbsolute("//a:a", ImmutableMap.of()), "a"),
+                ImmutableSet.of(Label.parseAbsolute("//a:a", ImmutableMap.of()))),
             getOptionsAndTrim(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//a:a"), "a", Label.parseAbsolute("//b:b"), "b"),
-                ImmutableSet.of(Label.parseAbsolute("//a:a"))))
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()),
+                    "a",
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()),
+                    "b"),
+                ImmutableSet.of(Label.parseAbsolute("//a:a", ImmutableMap.of()))))
         .addEqualityGroup(
             // Only //b:b => a, others default
-            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//b:b"), "a")))
+            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//b:b", ImmutableMap.of()), "a")))
         .addEqualityGroup(
             // Only //a:a => b, others default
-            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//a:a"), "b")))
+            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//a:a", ImmutableMap.of()), "b")))
         .addEqualityGroup(
             // Only //b:b => b, others default
-            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//b:b"), "b")))
+            getOptionsWith(ImmutableMap.of(Label.parseAbsolute("//b:b", ImmutableMap.of()), "b")))
         .addEqualityGroup(
             // //a:a => b and //b:b => a, others default (order doesn't matter)
             getOptionsWith(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//a:a"), "b",
-                    Label.parseAbsolute("//b:b"), "a")),
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()), "b",
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()), "a")),
             getOptionsWith(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//b:b"), "a",
-                    Label.parseAbsolute("//a:a"), "b")))
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()), "a",
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()), "b")))
         .addEqualityGroup(
             // //a:a => b and //b:b => a, others trimmed (order doesn't matter)
             getOptionsAndTrim(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//a:a"), "b",
-                    Label.parseAbsolute("//b:b"), "a"),
-                ImmutableSet.of(Label.parseAbsolute("//a:a"), Label.parseAbsolute("//b:b"))),
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()), "b",
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()), "a"),
+                ImmutableSet.of(
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()),
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()))),
             getOptionsAndTrim(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//a:a"), "b",
-                    Label.parseAbsolute("//b:b"), "a"),
-                ImmutableSet.of(Label.parseAbsolute("//b:b"), Label.parseAbsolute("//a:a"))),
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()), "b",
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()), "a"),
+                ImmutableSet.of(
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()),
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()))),
             getOptionsAndTrim(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//b:b"), "a",
-                    Label.parseAbsolute("//a:a"), "b"),
-                ImmutableSet.of(Label.parseAbsolute("//a:a"), Label.parseAbsolute("//b:b"))),
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()), "a",
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()), "b"),
+                ImmutableSet.of(
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()),
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()))),
             getOptionsAndTrim(
                 ImmutableMap.of(
-                    Label.parseAbsolute("//b:b"), "a",
-                    Label.parseAbsolute("//a:a"), "b"),
-                ImmutableSet.of(Label.parseAbsolute("//b:b"), Label.parseAbsolute("//a:a"))))
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()), "a",
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()), "b"),
+                ImmutableSet.of(
+                    Label.parseAbsolute("//b:b", ImmutableMap.of()),
+                    Label.parseAbsolute("//a:a", ImmutableMap.of()))))
         .testEquals();
   }
 
@@ -341,7 +358,7 @@
   public void parser_doesNotAllowFlagValuesToBeParsed() throws Exception {
     ConfigFeatureFlagOptions options = Options.getDefaults(ConfigFeatureFlagOptions.class);
     ImmutableSortedMap<Label, String> testValue =
-        ImmutableSortedMap.of(Label.parseAbsolute("//what:heck"), "something");
+        ImmutableSortedMap.of(Label.parseAbsolute("//what:heck", ImmutableMap.of()), "something");
     options.flagValues = testValue;
     String flagValuesOption =
         options
@@ -363,7 +380,8 @@
   @Test
   public void parser_doesNotAllowKnownDefaultValuesToBeParsed() throws Exception {
     ConfigFeatureFlagOptions options = Options.getDefaults(ConfigFeatureFlagOptions.class);
-    ImmutableSortedSet<Label> testValue = ImmutableSortedSet.of(Label.parseAbsolute("//what:heck"));
+    ImmutableSortedSet<Label> testValue =
+        ImmutableSortedSet.of(Label.parseAbsolute("//what:heck", ImmutableMap.of()));
     options.knownDefaultFlags = testValue;
     String defaultValuesOption =
         options
@@ -385,7 +403,8 @@
   @Test
   public void parser_doesNotAllowUnknownValuesToBeParsed() throws Exception {
     ConfigFeatureFlagOptions options = Options.getDefaults(ConfigFeatureFlagOptions.class);
-    ImmutableSortedSet<Label> testValue = ImmutableSortedSet.of(Label.parseAbsolute("//what:heck"));
+    ImmutableSortedSet<Label> testValue =
+        ImmutableSortedSet.of(Label.parseAbsolute("//what:heck", ImmutableMap.of()));
     options.unknownFlags = testValue;
     String unknownFlagsOption =
         options
diff --git a/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagTransitionFactoryTest.java b/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagTransitionFactoryTest.java
index 1899d32..362b898 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagTransitionFactoryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/config/ConfigFeatureFlagTransitionFactoryTest.java
@@ -120,7 +120,8 @@
     Rule rule = scratchRule("a", "empty", "feature_flag_setter(name = 'empty', flag_values = {})");
     PatchTransition transition =
         new ConfigFeatureFlagTransitionFactory("flag_values").buildTransitionFor(rule);
-    Map<Label, String> originalFlagMap = ImmutableMap.of(Label.parseAbsolute("//a:flag"), "value");
+    Map<Label, String> originalFlagMap =
+        ImmutableMap.of(Label.parseAbsolute("//a:flag", ImmutableMap.of()), "value");
 
     BuildOptions original = getOptionsWithFlagFragment(originalFlagMap);
     BuildOptions converted = transition.patch(original);
@@ -147,8 +148,10 @@
             "    default_value = 'a')");
     PatchTransition transition =
         new ConfigFeatureFlagTransitionFactory("flag_values").buildTransitionFor(rule);
-    Map<Label, String> originalFlagMap = ImmutableMap.of(Label.parseAbsolute("//a:old"), "value");
-    Map<Label, String> expectedFlagMap = ImmutableMap.of(Label.parseAbsolute("//a:flag"), "a");
+    Map<Label, String> originalFlagMap =
+        ImmutableMap.of(Label.parseAbsolute("//a:old", ImmutableMap.of()), "value");
+    Map<Label, String> expectedFlagMap =
+        ImmutableMap.of(Label.parseAbsolute("//a:flag", ImmutableMap.of()), "a");
 
     BuildOptions original = getOptionsWithFlagFragment(originalFlagMap);
     BuildOptions converted = transition.patch(original);
diff --git a/src/test/java/com/google/devtools/build/lib/rules/config/ConfigSettingTest.java b/src/test/java/com/google/devtools/build/lib/rules/config/ConfigSettingTest.java
index 46042fd..00737cb 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/config/ConfigSettingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/config/ConfigSettingTest.java
@@ -177,7 +177,7 @@
   public void labelGetter() throws Exception {
     writeSimpleExample();
     assertThat(getConfigMatchingProvider("//pkg:foo").label())
-        .isEqualTo(Label.parseAbsolute("//pkg:foo"));
+        .isEqualTo(Label.parseAbsolute("//pkg:foo", ImmutableMap.of()));
   }
 
   /**
diff --git a/src/test/java/com/google/devtools/build/lib/rules/config/FeatureFlagManualTrimmingTest.java b/src/test/java/com/google/devtools/build/lib/rules/config/FeatureFlagManualTrimmingTest.java
index a89c44e..d03118c 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/config/FeatureFlagManualTrimmingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/config/FeatureFlagManualTrimmingTest.java
@@ -18,6 +18,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSortedMap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Ordering;
@@ -184,7 +185,7 @@
     Artifact targetFlags =
         Iterables.getOnlyElement(getFilesToBuild(getConfiguredTarget("//test:target")).toList());
 
-    Label usedFlag = Label.parseAbsolute("//test:used_flag");
+    Label usedFlag = Label.parseAbsolute("//test:used_flag", ImmutableMap.of());
     assertThat(getFlagValuesFromOutputFile(targetFlags)).containsEntry(usedFlag, "configured");
   }
 
@@ -269,7 +270,7 @@
     Artifact targetFlags =
         Iterables.getOnlyElement(getFilesToBuild(getConfiguredTarget("//test:target")).toList());
 
-    Label usedFlag = Label.parseAbsolute("//test:used_flag");
+    Label usedFlag = Label.parseAbsolute("//test:used_flag", ImmutableMap.of());
     assertThat(getFlagValuesFromOutputFile(targetFlags)).containsEntry(usedFlag, "default");
   }
 
@@ -642,7 +643,7 @@
     Artifact targetFlags =
         Iterables.getOnlyElement(getFilesToBuild(getConfiguredTarget("//test:target")).toList());
 
-    Label usedFlag = Label.parseAbsolute("//test:used_flag");
+    Label usedFlag = Label.parseAbsolute("//test:used_flag", ImmutableMap.of());
     assertThat(getFlagValuesFromOutputFile(targetFlags)).containsEntry(usedFlag, "default");
   }
 
@@ -714,7 +715,7 @@
     Artifact targetFlags =
         Iterables.getOnlyElement(getFilesToBuild(getConfiguredTarget("//test:reader")).toList());
 
-    Label usedFlag = Label.parseAbsolute("//test:used_flag");
+    Label usedFlag = Label.parseAbsolute("//test:used_flag", ImmutableMap.of());
     assertThat(getFlagValuesFromOutputFile(targetFlags)).containsEntry(usedFlag, "default");
   }
 
@@ -764,7 +765,7 @@
     Artifact targetFlags =
         Iterables.getOnlyElement(getFilesToBuild(getConfiguredTarget("//test:toplevel")).toList());
 
-    Label usedFlag = Label.parseAbsolute("//test:used_flag");
+    Label usedFlag = Label.parseAbsolute("//test:used_flag", ImmutableMap.of());
     assertThat(getFlagValuesFromOutputFile(targetFlags)).containsEntry(usedFlag, "configured");
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java
index 18f661b..49b14ea 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java
@@ -574,7 +574,7 @@
         "cc_library(name = 'lib',",
         "           srcs = ['foo.cc'],",
         "           includes = ['./'])");
-    Label label = Label.parseAbsolute("@pkg//bar:lib");
+    Label label = Label.parseAbsolute("@pkg//bar:lib", ImmutableMap.of());
     ConfiguredTarget target = view.getConfiguredTargetForTesting(reporter, label, targetConfig);
     assertThat(view.hasErrors(target)).isFalse();
     assertNoEvents();
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSelectionTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSelectionTest.java
index 2f72860..75071f3 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSelectionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CcToolchainSelectionTest.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.analysis.ConfiguredTarget;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
@@ -67,7 +68,7 @@
         (CcToolchainProvider)
             getRuleContext(target)
                 .getToolchainContext()
-                .forToolchainType(Label.parseAbsolute(CPP_TOOLCHAIN_TYPE));
+                .forToolchainType(Label.parseAbsolute(CPP_TOOLCHAIN_TYPE, ImmutableMap.of()));
     assertThat(Iterables.getOnlyElement(toolchain.getCompile()).getExecPathString())
         .endsWith("piii");
   }
@@ -103,7 +104,7 @@
         (CcToolchainProvider)
             getRuleContext(target)
                 .getToolchainContext()
-                .forToolchainType(Label.parseAbsolute(CPP_TOOLCHAIN_TYPE));
+                .forToolchainType(Label.parseAbsolute(CPP_TOOLCHAIN_TYPE, ImmutableMap.of()));
     assertThat(toolchain.getToolchainIdentifier()).endsWith("piii");
   }
 
@@ -164,7 +165,7 @@
         (CcToolchainProvider)
             getRuleContext(target)
                 .getToolchainContext()
-                .forToolchainType(Label.parseAbsolute(CPP_TOOLCHAIN_TYPE));
+                .forToolchainType(Label.parseAbsolute(CPP_TOOLCHAIN_TYPE, ImmutableMap.of()));
     assertThat(toolchain.getToolPathFragment(CppConfiguration.Tool.LD).toString())
         .contains("piii-ld");
   }
diff --git a/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoSkylarkApiTest.java b/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoSkylarkApiTest.java
index 6fcd099..55229e8 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoSkylarkApiTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoSkylarkApiTest.java
@@ -17,6 +17,7 @@
 import static com.google.devtools.build.lib.actions.util.ActionsTestUtil.prettyArtifactNames;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Streams;
 import com.google.devtools.build.lib.analysis.ConfiguredTarget;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
@@ -506,9 +507,8 @@
 
     JavaExportsProvider exportsProvider = javaInfo.getProvider(JavaExportsProvider.class);
 
-    assertThat(
-        exportsProvider.getTransitiveExports())
-        .containsExactly(Label.parseAbsolute("//foo:my_java_lib_b"));
+    assertThat(exportsProvider.getTransitiveExports())
+        .containsExactly(Label.parseAbsolute("//foo:my_java_lib_b", ImmutableMap.of()));
 
     JavaCompilationArgsProvider javaCompilationArgsProvider =
         javaInfo.getProvider(JavaCompilationArgsProvider.class);
@@ -577,9 +577,8 @@
 
     JavaExportsProvider exportsProvider = javaInfo.getProvider(JavaExportsProvider.class);
 
-    assertThat(
-        exportsProvider.getTransitiveExports())
-        .containsExactly(Label.parseAbsolute("//foo:my_java_lib_b"));
+    assertThat(exportsProvider.getTransitiveExports())
+        .containsExactly(Label.parseAbsolute("//foo:my_java_lib_b", ImmutableMap.of()));
 
     JavaCompilationArgsProvider javaCompilationArgsProvider =
         javaInfo.getProvider(JavaCompilationArgsProvider.class);
@@ -879,7 +878,9 @@
   private JavaInfo fetchJavaInfo() throws Exception {
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
     Info info =
-        myRuleTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     @SuppressWarnings("unchecked")
     JavaInfo javaInfo = (JavaInfo) info.getValue("property");
diff --git a/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoTest.java b/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoTest.java
index 58cbf5f..c1c44d7 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/java/JavaInfoTest.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
 import com.google.devtools.build.lib.collect.nestedset.NestedSet;
@@ -73,11 +74,11 @@
 
     assertThat(labels)
         .containsExactly(
-            Label.parseAbsolute("//foo:foo0.bzl"),
-            Label.parseAbsolute("//foo:foo1.bzl"),
-            Label.parseAbsolute("//bar:bar0.bzl"),
-            Label.parseAbsolute("//bar:bar1.bzl"),
-            Label.parseAbsolute("//bar:bar2.bzl"))
+            Label.parseAbsolute("//foo:foo0.bzl", ImmutableMap.of()),
+            Label.parseAbsolute("//foo:foo1.bzl", ImmutableMap.of()),
+            Label.parseAbsolute("//bar:bar0.bzl", ImmutableMap.of()),
+            Label.parseAbsolute("//bar:bar1.bzl", ImmutableMap.of()),
+            Label.parseAbsolute("//bar:bar2.bzl", ImmutableMap.of()))
         .inOrder();
   }
 
@@ -86,7 +87,7 @@
     NestedSetBuilder<Label> builder = NestedSetBuilder.stableOrder();
     for (int i = 0; i < count; i++) {
       String absName = String.format("//%s:%s%d.bzl", prefix, prefix, i);
-      Label label = Label.parseAbsolute(absName);
+      Label label = Label.parseAbsolute(absName, ImmutableMap.of());
       builder.add(label);
     } // TODO(dbabkin): refactor to use NestedSetCollector whe it will be ready.
     return new JavaExportsProvider(builder.build());
diff --git a/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java b/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java
index 47036d7..c5956c0 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.devtools.build.lib.actions.util.ActionsTestUtil.prettyArtifactNames;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.Artifact;
 import com.google.devtools.build.lib.actions.util.ActionsTestUtil;
@@ -198,7 +199,8 @@
     ConfiguredTarget configuredTarget = getConfiguredTarget("//java/test:my");
     Info info =
         configuredTarget.get(
-            new SkylarkKey(Label.parseAbsolute("//java/test:extension.bzl"), "result"));
+            new SkylarkKey(
+                Label.parseAbsolute("//java/test:extension.bzl", ImmutableMap.of()), "result"));
 
     SkylarkNestedSet transitiveRuntimeJars =
         ((SkylarkNestedSet) info.getValue("transitive_runtime_jars"));
@@ -295,7 +297,8 @@
     ConfiguredTarget configuredTarget = getConfiguredTarget("//java/test:my");
     Info info =
         configuredTarget.get(
-            new SkylarkKey(Label.parseAbsolute("//java/test:extension.bzl"), "result"));
+            new SkylarkKey(
+                Label.parseAbsolute("//java/test:extension.bzl", ImmutableMap.of()), "result"));
 
     JavaRuleOutputJarsProvider outputs = ((JavaRuleOutputJarsProvider) info.getValue("outputs"));
     assertThat(outputs.getOutputJars()).hasSize(1);
@@ -717,7 +720,8 @@
     ConfiguredTarget configuredTarget = getConfiguredTarget("//java/test:my");
     Info info =
         configuredTarget.get(
-            new SkylarkKey(Label.parseAbsolute("//java/test:extension.bzl"), "result"));
+            new SkylarkKey(
+                Label.parseAbsolute("//java/test:extension.bzl", ImmutableMap.of()), "result"));
 
     SkylarkNestedSet sourceJars = ((SkylarkNestedSet) info.getValue("source_jars"));
     SkylarkNestedSet transitiveDeps = ((SkylarkNestedSet) info.getValue("transitive_deps"));
@@ -815,7 +819,8 @@
     ConfiguredTarget configuredTarget = getConfiguredTarget("//java/test:my");
     Info info =
         configuredTarget.get(
-            new SkylarkKey(Label.parseAbsolute("//java/test:extension.bzl"), "result"));
+            new SkylarkKey(
+                Label.parseAbsolute("//java/test:extension.bzl", ImmutableMap.of()), "result"));
 
     assertThat(info.getValue("enabled")).isEqualTo(Boolean.TRUE);
     assertThat(info.getValue("class_jar")).isNotNull();
@@ -874,7 +879,8 @@
     // Extract out the information from skylark rule
     Info info =
         myConfiguredTarget.get(
-            new SkylarkKey(Label.parseAbsolute("//java/test:extension.bzl"), "result"));
+            new SkylarkKey(
+                Label.parseAbsolute("//java/test:extension.bzl", ImmutableMap.of()), "result"));
 
     SkylarkNestedSet rawMyCompileJars = (SkylarkNestedSet) (info.getValue("compile_jars"));
     SkylarkNestedSet rawMyTransitiveRuntimeJars =
@@ -1164,7 +1170,8 @@
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:r");
     ConfiguredTarget javaLibraryTarget = getConfiguredTarget("//foo:jl");
     SkylarkKey myProviderKey =
-        new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "my_provider");
+        new SkylarkKey(
+            Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "my_provider");
     Info declaredProvider = myRuleTarget.get(myProviderKey);
     Object javaProvider = declaredProvider.getValue("p");
     assertThat(javaProvider).isInstanceOf(JavaInfo.class);
@@ -1314,8 +1321,10 @@
         "my_rule(name = 'my_skylark_rule', dep = ':my_java_lib_a')");
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
-    Info info = myRuleTarget.get(
-        new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+    Info info =
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
     @SuppressWarnings("unchecked") SkylarkList<Artifact> sourceJars =
         (SkylarkList<Artifact>) (info.getValue("source_jars"));
     assertThat(prettyArtifactNames(sourceJars)).containsExactly("foo/libmy_java_lib_a-src.jar");
@@ -1342,7 +1351,9 @@
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
     Info info =
-        myRuleTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     @SuppressWarnings("unchecked")
     SkylarkNestedSet sourceJars = (SkylarkNestedSet) info.getValue("property");
@@ -1373,7 +1384,9 @@
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
     Info info =
-        myRuleTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     @SuppressWarnings("unchecked")
     SkylarkNestedSet sourceJars = (SkylarkNestedSet) info.getValue("property");
@@ -1404,7 +1417,9 @@
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
     Info info =
-        myRuleTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     @SuppressWarnings("unchecked")
     SkylarkNestedSet sourceJars = (SkylarkNestedSet) info.getValue("property");
@@ -1435,14 +1450,16 @@
         "my_rule(name = 'my_skylark_rule', dep = ':my_java_lib_a')");
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
-    Info info = myRuleTarget.get(
-        new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+    Info info =
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     @SuppressWarnings("unchecked") SkylarkNestedSet exports =
         (SkylarkNestedSet) (info.getValue("property"));
 
     assertThat(exports.getSet(Label.class))
-        .containsExactly(Label.parseAbsolute("//foo:my_java_lib_b"));
+        .containsExactly(Label.parseAbsolute("//foo:my_java_lib_b", ImmutableMap.of()));
   }
 
 
@@ -1463,8 +1480,10 @@
         "my_rule(name = 'my_skylark_rule', dep = ':my_java_lib_a')");
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
-    Info info = myRuleTarget.get(
-        new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+    Info info =
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     JavaGenJarsProvider javaGenJarsProvider = (JavaGenJarsProvider) info.getValue("property");
 
@@ -1491,8 +1510,10 @@
         "my_rule(name = 'my_skylark_rule', dep = ':my_java_lib_a')");
     assertNoEvents();
     ConfiguredTarget myRuleTarget = getConfiguredTarget("//foo:my_skylark_rule");
-    Info info = myRuleTarget.get(
-        new SkylarkKey(Label.parseAbsolute("//foo:extension.bzl"), "result"));
+    Info info =
+        myRuleTarget.get(
+            new SkylarkKey(
+                Label.parseAbsolute("//foo:extension.bzl", ImmutableMap.of()), "result"));
 
     JavaCompilationInfoProvider javaCompilationInfoProvider =
         (JavaCompilationInfoProvider) info.getValue("property");
@@ -1649,7 +1670,8 @@
     );
     ConfiguredTarget configuredTarget = getConfiguredTarget("//foo:myrule");
     Info info =
-        configuredTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl"), "result"));
+        configuredTarget.get(
+            new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl", ImmutableMap.of()), "result"));
     assertThat(((String) info.getValue("strict_java_deps"))).isEqualTo("default");
   }
 
@@ -1673,7 +1695,8 @@
     useConfiguration("--strict_java_deps=ERROR");
     ConfiguredTarget configuredTarget = getConfiguredTarget("//foo:myrule");
     Info info =
-        configuredTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl"), "result"));
+        configuredTarget.get(
+            new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl", ImmutableMap.of()), "result"));
     assertThat(((String) info.getValue("strict_java_deps"))).isEqualTo("error");
   }
 
@@ -1699,7 +1722,8 @@
     );
     ConfiguredTarget configuredTarget = getConfiguredTarget("//foo:myrule");
     Info info =
-        configuredTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl"), "result"));
+        configuredTarget.get(
+            new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl", ImmutableMap.of()), "result"));
     Label javaToolchainLabel = ((Label) info.getValue("java_toolchain_label"));
     assertThat(javaToolchainLabel.toString()).endsWith("jdk:toolchain");
   }
@@ -1727,7 +1751,8 @@
     useConfiguration("--java_toolchain=//java/com/google/test:toolchain");
     ConfiguredTarget configuredTarget = getConfiguredTarget("//foo:myrule");
     Info info =
-        configuredTarget.get(new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl"), "result"));
+        configuredTarget.get(
+            new SkylarkKey(Label.parseAbsolute("//foo:rule.bzl", ImmutableMap.of()), "result"));
     Label javaToolchainLabel = ((Label) info.getValue("java_toolchain_label"));
     assertThat(javaToolchainLabel.toString()).isEqualTo("//java/com/google/test:toolchain");
   }
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java
index 8983cca..f617673 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java
@@ -380,7 +380,7 @@
       String objFileName,
       Iterable<String> compilationInputExecPaths)
       throws Exception {
-    String labelName = Label.parseAbsolute(targetLabel).getName();
+    String labelName = Label.parseAbsolute(targetLabel, ImmutableMap.of()).getName();
     CommandAction linkAction =
         (CommandAction)
             getGeneratingAction(
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/J2ObjcSourceTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/J2ObjcSourceTest.java
index 0486cd3..1304d64 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/J2ObjcSourceTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/J2ObjcSourceTest.java
@@ -15,6 +15,7 @@
 package com.google.devtools.build.lib.rules.objc;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.testing.EqualsTester;
 import com.google.devtools.build.lib.actions.Artifact;
 import com.google.devtools.build.lib.actions.ArtifactRoot;
@@ -61,7 +62,7 @@
 
   private J2ObjcSource getJ2ObjcSource(String label, String fileName,
       J2ObjcSource.SourceType sourceType) throws Exception {
-    Label ruleLabel = Label.parseAbsolute(label);
+    Label ruleLabel = Label.parseAbsolute(label, ImmutableMap.of());
     PathFragment path = ruleLabel.toPathFragment();
     return new J2ObjcSource(
         ruleLabel,
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcBuildVariablesTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcBuildVariablesTest.java
index 5d2eed5..689bbb5 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcBuildVariablesTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcBuildVariablesTest.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.actions.Action;
 import com.google.devtools.build.lib.actions.Artifact;
 import com.google.devtools.build.lib.actions.CommandAction;
@@ -118,7 +119,8 @@
     // actions, follow the chain of actions starting at the lipobin
     // creation.
     Artifact lipoBin =
-        getBinArtifact(Label.parseAbsolute("//x:bin").getName() + "_lipobin", target);
+        getBinArtifact(
+            Label.parseAbsolute("//x:bin", ImmutableMap.of()).getName() + "_lipobin", target);
     Action lipoAction = getGeneratingAction(lipoBin);
     Artifact bin = ActionsTestUtil.getFirstArtifactEndingWith(lipoAction.getInputs(), "_bin");
     CommandAction appleBinLinkAction = (CommandAction) getGeneratingAction(bin);
@@ -166,7 +168,8 @@
     // In order to get the set of variables that apply to the c++ actions, follow the chain of
     // actions starting at the lipobin creation.
     Artifact lipoBin =
-        getBinArtifact(Label.parseAbsolute("//x:bin").getName() + "_lipobin", target);
+        getBinArtifact(
+            Label.parseAbsolute("//x:bin", ImmutableMap.of()).getName() + "_lipobin", target);
     Action lipoAction = getGeneratingAction(lipoBin);
     Artifact bin = ActionsTestUtil.getFirstArtifactEndingWith(lipoAction.getInputs(), "_bin");
     CommandAction appleBinLinkAction = (CommandAction) getGeneratingAction(bin);
@@ -231,7 +234,8 @@
     // In order to get the set of variables that apply to the c++ actions, follow the chain of
     // actions starting at the lipobin creation.
     Artifact lipoBin =
-        getBinArtifact(Label.parseAbsolute("//x:bin").getName() + "_lipobin", target);
+        getBinArtifact(
+            Label.parseAbsolute("//x:bin", ImmutableMap.of()).getName() + "_lipobin", target);
     Action lipoAction = getGeneratingAction(lipoBin);
     Artifact bin = ActionsTestUtil.getFirstArtifactEndingWith(lipoAction.getInputs(), "_bin");
     CommandAction appleBinLinkAction = (CommandAction) getGeneratingAction(bin);
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java
index 68e3b0a..4227116 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java
@@ -31,6 +31,7 @@
 import com.google.common.base.Optional;
 import com.google.common.base.Splitter;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.Action;
@@ -910,7 +911,7 @@
   protected Action actionProducingArtifact(String targetLabel,
       String artifactSuffix) throws Exception {
     ConfiguredTarget libraryTarget = getConfiguredTarget(targetLabel);
-    Label parsedLabel = Label.parseAbsolute(targetLabel);
+    Label parsedLabel = Label.parseAbsolute(targetLabel, ImmutableMap.of());
     Artifact linkedLibrary = getBinArtifact(
         parsedLabel.getName() + artifactSuffix,
         libraryTarget);
@@ -1398,7 +1399,7 @@
   }
 
   private BinaryFileWriteAction plMergeAction(String binaryLabelString) throws Exception {
-    Label binaryLabel = Label.parseAbsolute(binaryLabelString);
+    Label binaryLabel = Label.parseAbsolute(binaryLabelString, ImmutableMap.of());
     ConfiguredTarget binary = getConfiguredTarget(binaryLabelString);
     return (BinaryFileWriteAction)
         getGeneratingAction(getBinArtifact(binaryLabel.getName()
diff --git a/src/test/java/com/google/devtools/build/lib/rules/platform/ConstraintTest.java b/src/test/java/com/google/devtools/build/lib/rules/platform/ConstraintTest.java
index 200d9f7..a6f0cda 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/platform/ConstraintTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/platform/ConstraintTest.java
@@ -16,6 +16,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.analysis.ConfiguredTarget;
 import com.google.devtools.build.lib.analysis.platform.PlatformProviderUtils;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
@@ -49,19 +50,19 @@
     assertThat(PlatformProviderUtils.constraintSetting(setting)).isNotNull();
     assertThat(PlatformProviderUtils.constraintSetting(setting)).isNotNull();
     assertThat(PlatformProviderUtils.constraintSetting(setting).label())
-        .isEqualTo(Label.parseAbsolute("//constraint:basic"));
+        .isEqualTo(Label.parseAbsolute("//constraint:basic", ImmutableMap.of()));
     ConfiguredTarget fooValue = getConfiguredTarget("//constraint:foo");
     assertThat(fooValue).isNotNull();
     assertThat(PlatformProviderUtils.constraintValue(fooValue)).isNotNull();
     assertThat(PlatformProviderUtils.constraintValue(fooValue).constraint().label())
-        .isEqualTo(Label.parseAbsolute("//constraint:basic"));
+        .isEqualTo(Label.parseAbsolute("//constraint:basic", ImmutableMap.of()));
     assertThat(PlatformProviderUtils.constraintValue(fooValue).label())
-        .isEqualTo(Label.parseAbsolute("//constraint:foo"));
+        .isEqualTo(Label.parseAbsolute("//constraint:foo", ImmutableMap.of()));
     ConfiguredTarget barValue = getConfiguredTarget("//constraint:bar");
     assertThat(barValue).isNotNull();
     assertThat(PlatformProviderUtils.constraintValue(barValue).constraint().label())
-        .isEqualTo(Label.parseAbsolute("//constraint:basic"));
+        .isEqualTo(Label.parseAbsolute("//constraint:basic", ImmutableMap.of()));
     assertThat(PlatformProviderUtils.constraintValue(barValue).label())
-        .isEqualTo(Label.parseAbsolute("//constraint:bar"));
+        .isEqualTo(Label.parseAbsolute("//constraint:bar", ImmutableMap.of()));
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java b/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java
index 262cb7d..e11d2d6 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/proto/ProtoLangToolchainTest.java
@@ -18,11 +18,11 @@
 import static com.google.devtools.build.lib.actions.util.ActionsTestUtil.prettyArtifactNames;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.eventbus.EventBus;
 import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
 import com.google.devtools.build.lib.cmdline.Label;
-
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
@@ -58,7 +58,8 @@
         .isEqualTo("x/plugin");
 
     TransitiveInfoCollection runtimes = toolchain.runtime();
-    assertThat(runtimes.getLabel()).isEqualTo(Label.parseAbsolute("//x:runtime"));
+    assertThat(runtimes.getLabel())
+        .isEqualTo(Label.parseAbsolute("//x:runtime", ImmutableMap.of()));
 
     assertThat(prettyArtifactNames(toolchain.blacklistedProtos()))
         .containsExactly("x/metadata.proto", "x/descriptor.proto", "x/any.proto");
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java
index 64244a5..bf20766 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/ExperimentalStateTrackerTest.java
@@ -22,6 +22,7 @@
 
 import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.devtools.build.lib.actions.Action;
 import com.google.devtools.build.lib.actions.ActionCompletionEvent;
@@ -335,7 +336,7 @@
     ManualClock clock = new ManualClock();
     ExperimentalStateTracker stateTracker = new ExperimentalStateTracker(clock);
     TestFilteringCompleteEvent filteringComplete = Mockito.mock(TestFilteringCompleteEvent.class);
-    Label labelA = Label.parseAbsolute("//foo/bar:baz");
+    Label labelA = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
     ConfiguredTarget targetA = Mockito.mock(ConfiguredTarget.class);
     when(targetA.getLabel()).thenReturn(labelA);
     ConfiguredTarget targetB = Mockito.mock(ConfiguredTarget.class);
@@ -368,7 +369,7 @@
     ManualClock clock = new ManualClock();
     ExperimentalStateTracker stateTracker = new ExperimentalStateTracker(clock);
     TestFilteringCompleteEvent filteringComplete = Mockito.mock(TestFilteringCompleteEvent.class);
-    Label labelA = Label.parseAbsolute("//foo/bar:baz");
+    Label labelA = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
     ConfiguredTarget targetA = Mockito.mock(ConfiguredTarget.class);
     when(targetA.getLabel()).thenReturn(labelA);
     ConfiguredTarget targetB = Mockito.mock(ConfiguredTarget.class);
@@ -399,7 +400,7 @@
     ManualClock clock = new ManualClock();
     ExperimentalStateTracker stateTracker = new ExperimentalStateTracker(clock);
     TestFilteringCompleteEvent filteringComplete = Mockito.mock(TestFilteringCompleteEvent.class);
-    Label labelA = Label.parseAbsolute("//foo/bar:baz");
+    Label labelA = Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of());
     ConfiguredTarget targetA = Mockito.mock(ConfiguredTarget.class);
     when(targetA.getLabel()).thenReturn(labelA);
     ConfiguredTarget targetB = Mockito.mock(ConfiguredTarget.class);
@@ -434,7 +435,8 @@
         "Building some/very/very/long/path/for/some/library/directory/foo.jar (42 source files)",
         "some/very/very/long/path/for/some/library/directory/foo.jar");
     Label label =
-        Label.parseAbsolute("//some/very/very/long/path/for/some/library/directory:libfoo");
+        Label.parseAbsolute(
+            "//some/very/very/long/path/for/some/library/directory:libfoo", ImmutableMap.of());
     ActionOwner owner =
         ActionOwner.create(
             label,
@@ -509,7 +511,8 @@
 
     Label bartestLabel =
         Label.parseAbsolute(
-            "//src/another/very/long/long/path/long/long/long/long/long/long/long/long/bars:bartest");
+            "//src/another/very/long/long/path/long/long/long/long/long/long/long/long/bars:bartest",
+            ImmutableMap.of());
     ConfiguredTarget bartestTarget = Mockito.mock(ConfiguredTarget.class);
     when(bartestTarget.getLabel()).thenReturn(bartestLabel);
 
@@ -772,7 +775,7 @@
     clock.advanceMillis(TimeUnit.SECONDS.toMillis(1234));
     ExperimentalStateTracker stateTracker = new ExperimentalStateTracker(clock, 80);
 
-    Label labelFooTest = Label.parseAbsolute("//foo/bar:footest");
+    Label labelFooTest = Label.parseAbsolute("//foo/bar:footest", ImmutableMap.of());
     ConfiguredTarget targetFooTest = Mockito.mock(ConfiguredTarget.class);
     when(targetFooTest.getLabel()).thenReturn(labelFooTest);
     ActionOwner fooOwner =
@@ -787,7 +790,7 @@
             null,
             null);
 
-    Label labelBarTest = Label.parseAbsolute("//baz:bartest");
+    Label labelBarTest = Label.parseAbsolute("//baz:bartest", ImmutableMap.of());
     ConfiguredTarget targetBarTest = Mockito.mock(ConfiguredTarget.class);
     when(targetBarTest.getLabel()).thenReturn(labelBarTest);
     TestFilteringCompleteEvent filteringComplete = Mockito.mock(TestFilteringCompleteEvent.class);
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java
index df0320f..fafe4b7 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java
@@ -215,7 +215,7 @@
   }
 
   private static Label label(String label) throws Exception {
-    return Label.parseAbsolute(label);
+    return Label.parseAbsolute(label, ImmutableMap.of());
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
index b6681d0..3d9971d 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
@@ -448,8 +448,10 @@
 
     SkyKey skyKey = PackageValue.key(PackageIdentifier.parse("@//foo"));
     PackageValue value = validPackage(skyKey);
-    assertThat(value.getPackage().getSkylarkFileDependencies()).containsExactly(
-        Label.parseAbsolute("//bar:ext.bzl"), Label.parseAbsolute("//baz:ext.bzl"));
+    assertThat(value.getPackage().getSkylarkFileDependencies())
+        .containsExactly(
+            Label.parseAbsolute("//bar:ext.bzl", ImmutableMap.of()),
+            Label.parseAbsolute("//baz:ext.bzl", ImmutableMap.of()));
 
     scratch.overwriteFile("bar/ext.bzl",
         "load('//qux:ext.bzl', 'c')",
@@ -461,8 +463,10 @@
             Root.fromPath(rootDirectory));
 
     value = validPackage(skyKey);
-    assertThat(value.getPackage().getSkylarkFileDependencies()).containsExactly(
-        Label.parseAbsolute("//bar:ext.bzl"), Label.parseAbsolute("//qux:ext.bzl"));
+    assertThat(value.getPackage().getSkylarkFileDependencies())
+        .containsExactly(
+            Label.parseAbsolute("//bar:ext.bzl", ImmutableMap.of()),
+            Label.parseAbsolute("//qux:ext.bzl", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/RuleContextTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/RuleContextTest.java
index 7423652..985cb9c 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/RuleContextTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/RuleContextTest.java
@@ -16,6 +16,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.analysis.RuleContext;
 import com.google.devtools.build.lib.analysis.platform.ToolchainInfo;
 import com.google.devtools.build.lib.cmdline.Label;
@@ -36,12 +37,12 @@
         "--platforms=//platforms:mac");
     RuleContext ruleContext = getRuleContext(getConfiguredTarget("//x"));
     assertThat(ruleContext.getToolchainContext().resolvedToolchainLabels())
-        .contains(Label.parseAbsolute("//toolchain:toolchain_1_impl"));
+        .contains(Label.parseAbsolute("//toolchain:toolchain_1_impl", ImmutableMap.of()));
 
     ToolchainInfo toolchain =
         ruleContext
             .getToolchainContext()
-            .forToolchainType(Label.parseAbsolute("//toolchain:test_toolchain"));
+            .forToolchainType(Label.parseAbsolute("//toolchain:test_toolchain", ImmutableMap.of()));
     assertThat(toolchain.getValue("data")).isEqualTo("foo");
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTest.java
index b13b879..eb43635 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTest.java
@@ -492,7 +492,7 @@
           }
         };
     fs.stubStat(bazDir, inconsistentParentFileStatus);
-    Set<Label> labels = ImmutableSet.of(Label.parseAbsolute("//foo:foo"));
+    Set<Label> labels = ImmutableSet.of(Label.parseAbsolute("//foo:foo", ImmutableMap.of()));
     getSkyframeExecutor()
         .getPackageManager()
         .newTransitiveLoader()
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTestCase.java b/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTestCase.java
index 9084371..fae9d22 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTestCase.java
@@ -19,6 +19,7 @@
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
@@ -228,7 +229,7 @@
       throws LabelSyntaxException, NoSuchThingException, InterruptedException {
     Set<Target> targets = new HashSet<>();
     for (String strLabel : strLabels) {
-      Label label = Label.parseAbsolute(strLabel);
+      Label label = Label.parseAbsolute(strLabel, ImmutableMap.of());
       targets.add(getSkyframeExecutor().getPackageManager().getTarget(reporter, label));
     }
     return targets;
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/TargetMarkerFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/TargetMarkerFunctionTest.java
index 75a4888..6778dc8 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/TargetMarkerFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/TargetMarkerFunctionTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
 import com.google.devtools.build.lib.analysis.util.BuildViewTestCase;
 import com.google.devtools.build.lib.clock.BlazeClock;
@@ -63,12 +64,12 @@
   }
 
   private SkyKey skyKey(String labelName) throws Exception {
-    return TargetMarkerValue.key(Label.parseAbsolute(labelName));
+    return TargetMarkerValue.key(Label.parseAbsolute(labelName, ImmutableMap.of()));
   }
 
   private Throwable getErrorFromTargetValue(String labelName) throws Exception {
     reporter.removeHandler(failFastHandler);
-    SkyKey targetKey = TargetMarkerValue.key(Label.parseAbsolute(labelName));
+    SkyKey targetKey = TargetMarkerValue.key(Label.parseAbsolute(labelName, ImmutableMap.of()));
     EvaluationResult<TargetMarkerValue> evaluationResult =
         SkyframeExecutorTestUtils.evaluate(
             skyframeExecutor, targetKey, /*keepGoing=*/ false, reporter);
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalFunctionTest.java
index 7749f9e..f338971 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalFunctionTest.java
@@ -43,7 +43,7 @@
   @Test
   public void noRepeatedLabelVisitationForTransitiveTraversalFunction() throws Exception {
     // Create a basic package with a target //foo:foo.
-    Label label = Label.parseAbsolute("//foo:foo");
+    Label label = Label.parseAbsolute("//foo:foo", ImmutableMap.of());
     Package pkg =
         scratchPackage(
             "workspace",
@@ -64,8 +64,8 @@
     // Create the GroupedList saying we had already requested two targets the last time we called
     // #compute.
     GroupedListHelper<SkyKey> helper = new GroupedListHelper<>();
-    SkyKey fakeDep1 = function.getKey(Label.parseAbsolute("//foo:bar"));
-    SkyKey fakeDep2 = function.getKey(Label.parseAbsolute("//foo:baz"));
+    SkyKey fakeDep1 = function.getKey(Label.parseAbsolute("//foo:bar", ImmutableMap.of()));
+    SkyKey fakeDep2 = function.getKey(Label.parseAbsolute("//foo:baz", ImmutableMap.of()));
     helper.add(TargetMarkerValue.key(label));
     helper.add(PackageValue.key(label.getPackageIdentifier()));
     helper.startGroup();
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunctionTest.java
index 4e633e4..9a50298 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/WorkspaceFileFunctionTest.java
@@ -17,6 +17,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.actions.FileStateValue;
 import com.google.devtools.build.lib.actions.FileValue;
 import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
@@ -206,7 +207,8 @@
     SkyKey key = ExternalPackageFunction.key(workspacePath);
     PackageValue value = (PackageValue) externalSkyFunc.compute(key, getEnv());
     Package pkg = value.getPackage();
-    assertThat(getLabelMapping(pkg, "foo/bar")).isEqualTo(Label.parseAbsolute("//foo:bar"));
+    assertThat(getLabelMapping(pkg, "foo/bar"))
+        .isEqualTo(Label.parseAbsolute("//foo:bar", ImmutableMap.of()));
     MoreAsserts.assertNoEvents(pkg.getEvents());
   }
 
@@ -218,7 +220,8 @@
     SkyKey key = ExternalPackageFunction.key(workspacePath);
     PackageValue value = (PackageValue) externalSkyFunc.compute(key, getEnv());
     Package pkg = value.getPackage();
-    assertThat(getLabelMapping(pkg, "foo/bar")).isEqualTo(Label.parseAbsolute("//foo:bar"));
+    assertThat(getLabelMapping(pkg, "foo/bar"))
+        .isEqualTo(Label.parseAbsolute("//foo:bar", ImmutableMap.of()));
     MoreAsserts.assertNoEvents(pkg.getEvents());
   }
 
@@ -274,7 +277,8 @@
     SkyKey key = ExternalPackageFunction.key(workspacePath);
     PackageValue value = (PackageValue) externalSkyFunc.compute(key, getEnv());
     Package pkg = value.getPackage();
-    assertThat(getLabelMapping(pkg, "foo/bar")).isEqualTo(Label.parseAbsolute("//foo:bar"));
+    assertThat(getLabelMapping(pkg, "foo/bar"))
+        .isEqualTo(Label.parseAbsolute("//foo:bar", ImmutableMap.of()));
     MoreAsserts.assertNoEvents(pkg.getEvents());
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/serialization/LabelCodecTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/serialization/LabelCodecTest.java
index 745ad95..08ea24e 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/serialization/LabelCodecTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/serialization/LabelCodecTest.java
@@ -14,6 +14,7 @@
 
 package com.google.devtools.build.lib.skyframe.serialization;
 
+import com.google.common.collect.ImmutableMap;
 import com.google.devtools.build.lib.cmdline.Label;
 import com.google.devtools.build.lib.skyframe.serialization.testutils.SerializationTester;
 import org.junit.Test;
@@ -26,6 +27,6 @@
 
   @Test
   public void testCodec() throws Exception {
-    new SerializationTester(Label.parseAbsolute("//foo/bar:baz")).runTests();
+    new SerializationTester(Label.parseAbsolute("//foo/bar:baz", ImmutableMap.of())).runTests();
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkActionProviderTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkActionProviderTest.java
index e3afc4e..e1c4cd1 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkActionProviderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkActionProviderTest.java
@@ -16,6 +16,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.ActionAnalysisMetadata;
 import com.google.devtools.build.lib.actions.Artifact;
@@ -58,7 +59,8 @@
     ConfiguredAspect configuredAspect =
         Iterables.getOnlyElement(analysisResult.getAspects()).getConfiguredAspect();
 
-    SkylarkKey fooKey = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "foo");
+    SkylarkKey fooKey =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "foo");
 
     assertThat(configuredAspect.get(fooKey).getValue("actions")).isNotNull();
     @SuppressWarnings("unchecked")
@@ -112,7 +114,8 @@
     ConfiguredAspect configuredAspect =
         Iterables.getOnlyElement(analysisResult.getAspects()).getConfiguredAspect();
 
-    SkylarkKey fooKey = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "foo");
+    SkylarkKey fooKey =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "foo");
 
     assertThat(configuredAspect.get(fooKey).getValue("actions")).isNotNull();
 
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java
index b81b493..a0786f9 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkDefinedAspectsTest.java
@@ -21,6 +21,7 @@
 import static org.junit.Assert.fail;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.Action;
 import com.google.devtools.build.lib.actions.Artifact;
@@ -106,8 +107,10 @@
     ConfiguredAspect configuredAspect = Iterables.getOnlyElement(analysisResult.getAspects())
         .getConfiguredAspect();
 
-    SkylarkKey fooKey = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "foo");
-    SkylarkKey barKey = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "bar");
+    SkylarkKey fooKey =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "foo");
+    SkylarkKey barKey =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "bar");
 
     assertThat(configuredAspect.get(fooKey).getProvider().getKey()).isEqualTo(fooKey);
     assertThat(configuredAspect.get(barKey).getProvider().getKey()).isEqualTo(barKey);
@@ -133,8 +136,10 @@
     ConfiguredAspect configuredAspect = Iterables.getOnlyElement(analysisResult.getAspects())
         .getConfiguredAspect();
 
-    SkylarkKey fooKey = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "foo");
-    SkylarkKey barKey = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "bar");
+    SkylarkKey fooKey =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "foo");
+    SkylarkKey barKey =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "bar");
 
     assertThat(configuredAspect.get(fooKey).getProvider().getKey()).isEqualTo(fooKey);
     assertThat(configuredAspect.get(barKey).getProvider().getKey()).isEqualTo(barKey);
@@ -2290,7 +2295,8 @@
     AnalysisResult analysisResult = update(ImmutableList.of("//test:aspect.bzl%a3"), "//test:r2_1");
     ConfiguredAspect configuredAspect = Iterables.getOnlyElement(analysisResult.getAspects())
         .getConfiguredAspect();
-    SkylarkKey p3 = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "p3");
+    SkylarkKey p3 =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "p3");
     assertThat((SkylarkList<?>) configuredAspect.get(p3).getValue("value"))
         .containsExactly(
             "//test:r0_1=True",
@@ -2353,7 +2359,8 @@
     AnalysisResult analysisResult = update(ImmutableList.of(), "//test:rcollect");
     ConfiguredTarget configuredTarget =
         Iterables.getOnlyElement(analysisResult.getTargetsToBuild());
-    SkylarkKey pCollector = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "PCollector");
+    SkylarkKey pCollector =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "PCollector");
     assertThat((SkylarkList<?>) configuredTarget.get(pCollector).getValue("result"))
         .containsExactly(
             "//test:r1",
@@ -2393,9 +2400,11 @@
         update(ImmutableList.of("//test:aspect.bzl%acollect"), "//test:baz");
     ConfiguredAspect configuredAspect =
         Iterables.getOnlyElement(analysisResult.getAspects()).getConfiguredAspect();
-    SkylarkKey pCollector = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "PCollector");
+    SkylarkKey pCollector =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "PCollector");
     Info collector = configuredAspect.get(pCollector);
-    assertThat(collector.getValue("aspect_attr")).isEqualTo(Label.parseAbsolute("//test:foo"));
+    assertThat(collector.getValue("aspect_attr"))
+        .isEqualTo(Label.parseAbsolute("//test:foo", ImmutableMap.of()));
   }
 
   @Test
@@ -2434,7 +2443,8 @@
         update(ImmutableList.of("//test:aspect.bzl%acollect"), "//test:baz");
     ConfiguredAspect configuredAspect =
         Iterables.getOnlyElement(analysisResult.getAspects()).getConfiguredAspect();
-    SkylarkKey pCollector = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "PCollector");
+    SkylarkKey pCollector =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "PCollector");
     Info collector = configuredAspect.get(pCollector);
     assertThat(collector.getValue("attr_value")).isEqualTo(30);
   }
@@ -2489,7 +2499,8 @@
         update(ImmutableList.of("//test:aspect.bzl%acollect"), "//test:quux");
     ConfiguredAspect configuredAspect =
         Iterables.getOnlyElement(analysisResult.getAspects()).getConfiguredAspect();
-    SkylarkKey pCollector = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "PCollector");
+    SkylarkKey pCollector =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "PCollector");
     Info collector = configuredAspect.get(pCollector);
     assertThat(collector.getValue("attr_value")).isEqualTo(30);
   }
@@ -2529,13 +2540,14 @@
         update(ImmutableList.of("//test:aspect.bzl%acollect"), "//test:baz");
     ConfiguredAspect configuredAspect =
         Iterables.getOnlyElement(analysisResult.getAspects()).getConfiguredAspect();
-    SkylarkKey pCollector = new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl"), "PCollector");
+    SkylarkKey pCollector =
+        new SkylarkKey(Label.parseAbsolute("//test:aspect.bzl", ImmutableMap.of()), "PCollector");
     Info collector = configuredAspect.get(pCollector);
     assertThat(((SkylarkNestedSet) collector.getValue("visited")).toCollection())
         .containsExactly(
-            Label.parseAbsolute("//test:referenced_from_aspect_only"),
-            Label.parseAbsolute("//test:bar"),
-            Label.parseAbsolute("//test:baz"));
+            Label.parseAbsolute("//test:referenced_from_aspect_only", ImmutableMap.of()),
+            Label.parseAbsolute("//test:bar", ImmutableMap.of()),
+            Label.parseAbsolute("//test:baz", ImmutableMap.of()));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
index db9f87a..75d7929 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java
@@ -1639,7 +1639,8 @@
         "my_dep_rule(name = 'yyy', dep = ':xxx')"
     );
 
-    SkylarkKey pInfoKey = new SkylarkKey(Label.parseAbsolute("//test:rule.bzl"), "PInfo");
+    SkylarkKey pInfoKey =
+        new SkylarkKey(Label.parseAbsolute("//test:rule.bzl", ImmutableMap.of()), "PInfo");
 
     ConfiguredTarget targetXXX = getConfiguredTarget("//test:xxx");
     assertThat(targetXXX.get(pInfoKey).getValue("s"))
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java
index 0127f49..9b13ccd 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleContextTest.java
@@ -22,6 +22,7 @@
 
 import com.google.common.base.Splitter;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.ActionAnalysisMetadata;
 import com.google.devtools.build.lib.actions.Artifact;
@@ -970,7 +971,7 @@
     SkylarkRuleContext context = createRuleContext("//:r");
     Label keyLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr.label_dict.keys()[0].label");
-    assertThat(keyLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(keyLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
     String valueString =
         (String) evalRuleContextCode(context, "ruleContext.attr.label_dict.values()[0]");
     assertThat(valueString).isEqualTo("value");
@@ -1001,7 +1002,7 @@
     SkylarkRuleContext context = createRuleContext("//:r");
     Label keyLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr.label_dict.keys()[0].label");
-    assertThat(keyLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(keyLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
     String valueString =
         (String) evalRuleContextCode(context, "ruleContext.attr.label_dict.values()[0]");
     assertThat(valueString).isEqualTo("value");
@@ -1030,7 +1031,7 @@
     SkylarkRuleContext context = createRuleContext("//:r");
     Label keyLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr.label_dict.keys()[0].label");
-    assertThat(keyLabel).isEqualTo(Label.parseAbsolute("//:default"));
+    assertThat(keyLabel).isEqualTo(Label.parseAbsolute("//:default", ImmutableMap.of()));
     String valueString =
         (String) evalRuleContextCode(context, "ruleContext.attr.label_dict.values()[0]");
     assertThat(valueString).isEqualTo("defs");
@@ -1329,16 +1330,16 @@
     SkylarkRuleContext context = createRuleContext("//:r");
     Label explicitDepLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr.explicit_dep.label");
-    assertThat(explicitDepLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(explicitDepLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
     Label implicitDepLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr._implicit_dep.label");
-    assertThat(implicitDepLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(implicitDepLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
     Label explicitDepListLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr.explicit_dep_list[0].label");
-    assertThat(explicitDepListLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(explicitDepListLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
     Label implicitDepListLabel =
         (Label) evalRuleContextCode(context, "ruleContext.attr._implicit_dep_list[0].label");
-    assertThat(implicitDepListLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(implicitDepListLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
   }
 
   @Test
@@ -1370,7 +1371,7 @@
     invalidatePackages(/*alsoConfigs=*/false); // Repository shuffling messes with toolchain labels.
     SkylarkRuleContext context = createRuleContext("@r//a:r");
     Label depLabel = (Label) evalRuleContextCode(context, "ruleContext.attr.internal_dep.label");
-    assertThat(depLabel).isEqualTo(Label.parseAbsolute("//:dep"));
+    assertThat(depLabel).isEqualTo(Label.parseAbsolute("//:dep", ImmutableMap.of()));
   }
 
   @Test
@@ -1405,7 +1406,7 @@
     invalidatePackages(/*alsoConfigs=*/false); // Repository shuffling messes with toolchain labels.
     SkylarkRuleContext context = createRuleContext("@r//a:r");
     Label depLabel = (Label) evalRuleContextCode(context, "ruleContext.attr.internal_dep.label");
-    assertThat(depLabel).isEqualTo(Label.parseAbsolute("@r//:dep"));
+    assertThat(depLabel).isEqualTo(Label.parseAbsolute("@r//:dep", ImmutableMap.of()));
   }
 
   @Test
@@ -1472,7 +1473,7 @@
                     .getAssociatedRule()
                     .getAttributeContainer()
                     .getAttr("srcs"))
-        .contains(Label.parseAbsolute("@foo//:baz.txt"));
+        .contains(Label.parseAbsolute("@foo//:baz.txt", ImmutableMap.of()));
 
     scratch.overwriteFile("BUILD");
     scratch.overwriteFile("bar.bzl", "dummy = 1");
@@ -2025,7 +2026,7 @@
     assertThat(keyString).isEqualTo("x86");
     Label valueLabel =
         (Label) evalRuleContextCode(ruleContext, "ruleContext.attr.runtimes.values()[0]");
-    assertThat(valueLabel).isEqualTo(Label.parseAbsolute("//jvm:runtime"));
+    assertThat(valueLabel).isEqualTo(Label.parseAbsolute("//jvm:runtime", ImmutableMap.of()));
   }
 
   // A list of attributes and methods ctx objects have
@@ -2216,7 +2217,8 @@
         "a(name='a', value={'c': 'c', 'b': 'b', 'a': 'a', 'f': 'f', 'e': 'e', 'd': 'd'})");
 
     ConfiguredTarget a = getConfiguredTarget("//a");
-    SkylarkKey key = new SkylarkKey(Label.parseAbsolute("//a:a.bzl"), "key_provider");
+    SkylarkKey key =
+        new SkylarkKey(Label.parseAbsolute("//a:a.bzl", ImmutableMap.of()), "key_provider");
     @SuppressWarnings("unchecked")
     SkylarkList<String> keys = (SkylarkList<String>) a.get(key).getValue("keys");
     assertThat(keys).containsExactly("c", "b", "a", "f", "e", "d").inOrder();
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
index 1de6ab0..b8b38dd 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
@@ -21,6 +21,7 @@
 
 import com.google.common.base.Joiner;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.devtools.build.lib.actions.ActionAnalysisMetadata;
 import com.google.devtools.build.lib.actions.ActionKeyContext;
@@ -1336,7 +1337,9 @@
     Object provider = configuredTarget.get("proxy");
     assertThat(provider).isInstanceOf(Info.class);
     assertThat(((Info) provider).getProvider().getKey())
-        .isEqualTo(new SkylarkKey(Label.parseAbsolute("//test:foo.bzl"), "foo_provider"));
+        .isEqualTo(
+            new SkylarkKey(
+                Label.parseAbsolute("//test:foo.bzl", ImmutableMap.of()), "foo_provider"));
   }
 
   @Test
@@ -1376,7 +1379,8 @@
     Object provider = configuredTarget.get("proxy");
     assertThat(provider).isInstanceOf(Info.class);
     assertThat(((Info) provider).getProvider().getKey())
-        .isEqualTo(new SkylarkKey(Label.parseAbsolute("//test:foo.bzl"), "FooInfo"));
+        .isEqualTo(
+            new SkylarkKey(Label.parseAbsolute("//test:foo.bzl", ImmutableMap.of()), "FooInfo"));
   }
 
   @Test
@@ -1493,7 +1497,9 @@
     Object provider = configuredTarget.get("proxy");
     assertThat(provider).isInstanceOf(Info.class);
     assertThat(((Info) provider).getProvider().getKey())
-        .isEqualTo(new SkylarkKey(Label.parseAbsolute("//test:foo.bzl"), "foo_provider"));
+        .isEqualTo(
+            new SkylarkKey(
+                Label.parseAbsolute("//test:foo.bzl", ImmutableMap.of()), "foo_provider"));
     assertThat(((Info) provider).getValue("a")).isEqualTo(123);
   }
 
@@ -1540,7 +1546,9 @@
     Object provider = configuredTarget.get("proxy");
     assertThat(provider).isInstanceOf(Info.class);
     assertThat(((Info) provider).getProvider().getKey())
-        .isEqualTo(new SkylarkKey(Label.parseAbsolute("//test:foo.bzl"), "foo_provider"));
+        .isEqualTo(
+            new SkylarkKey(
+                Label.parseAbsolute("//test:foo.bzl", ImmutableMap.of()), "foo_provider"));
   }
 
   @Test
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java b/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java
index d6c1659..3609c0c 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/PrinterTest.java
@@ -61,8 +61,9 @@
     assertThat(Printer.repr(3)).isEqualTo("3");
     assertThat(Printer.repr(Runtime.NONE)).isEqualTo("None");
 
-    assertThat(Printer.str(Label.parseAbsolute("//x"))).isEqualTo("//x:x");
-    assertThat(Printer.repr(Label.parseAbsolute("//x"))).isEqualTo("Label(\"//x:x\")");
+    assertThat(Printer.str(Label.parseAbsolute("//x", ImmutableMap.of()))).isEqualTo("//x:x");
+    assertThat(Printer.repr(Label.parseAbsolute("//x", ImmutableMap.of())))
+        .isEqualTo("Label(\"//x:x\")");
 
     List<?> list = MutableList.of(null, "foo", "bar");
     List<?> tuple = Tuple.of("foo", "bar");
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkImportsTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkImportsTest.java
index cb8629c..813c727 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkImportsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkImportsTest.java
@@ -99,9 +99,10 @@
     assertThat(importForLabel.getImportString()).named("getImportString()").isEqualTo(labelString);
 
     // The import label is relative to the parent's package, not the parent's directory.
-    Label containingLabel = Label.parseAbsolute(containingLabelString);
-    assertThat(importForLabel.getLabel(containingLabel)).named("getLabel()")
-        .isEqualTo(Label.parseAbsolute(expectedLabelString));
+    Label containingLabel = Label.parseAbsolute(containingLabelString, ImmutableMap.of());
+    assertThat(importForLabel.getLabel(containingLabel))
+        .named("getLabel()")
+        .isEqualTo(Label.parseAbsolute(expectedLabelString, ImmutableMap.of()));
 
     assertThat(importForLabel.asPathFragment()).named("asPathFragment()")
         .isEqualTo(PathFragment.create(expectedPathString));
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java b/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java
index a7c45f4..0fd5490 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/TypeTest.java
@@ -48,7 +48,7 @@
 
   @Before
   public final void setCurrentRule() throws Exception  {
-    this.currentRule = Label.parseAbsolute("//quux:baz");
+    this.currentRule = Label.parseAbsolute("//quux:baz", ImmutableMap.of());
   }
 
   @Test
@@ -220,16 +220,14 @@
 
   @Test
   public void testLabel() throws Exception {
-    Label label = Label
-        .parseAbsolute("//foo:bar");
+    Label label = Label.parseAbsolute("//foo:bar", ImmutableMap.of());
     assertThat(BuildType.LABEL.convert("//foo:bar", null, currentRule)).isEqualTo(label);
     assertThat(collectLabels(BuildType.LABEL, label)).containsExactly(label);
   }
 
   @Test
   public void testNodepLabel() throws Exception {
-    Label label = Label
-        .parseAbsolute("//foo:bar");
+    Label label = Label.parseAbsolute("//foo:bar", ImmutableMap.of());
     assertThat(BuildType.NODEP_LABEL.convert("//foo:bar", null, currentRule)).isEqualTo(label);
     assertThat(collectLabels(BuildType.NODEP_LABEL, label)).containsExactly(label);
   }
@@ -237,9 +235,9 @@
   @Test
   public void testRelativeLabel() throws Exception {
     assertThat(BuildType.LABEL.convert(":wiz", null, currentRule))
-        .isEqualTo(Label.parseAbsolute("//quux:wiz"));
+        .isEqualTo(Label.parseAbsolute("//quux:wiz", ImmutableMap.of()));
     assertThat(BuildType.LABEL.convert("wiz", null, currentRule))
-        .isEqualTo(Label.parseAbsolute("//quux:wiz"));
+        .isEqualTo(Label.parseAbsolute("//quux:wiz", ImmutableMap.of()));
     try {
       BuildType.LABEL.convert("wiz", null);
       fail();
@@ -336,8 +334,9 @@
     List<Label> converted =
       BuildType.LABEL_LIST.convert(input , null, currentRule);
     List<Label> expected =
-      Arrays.asList(Label.parseAbsolute("//foo:bar"),
-                    Label.parseAbsolute("//quux:wiz"));
+        Arrays.asList(
+            Label.parseAbsolute("//foo:bar", ImmutableMap.of()),
+            Label.parseAbsolute("//quux:wiz", ImmutableMap.of()));
     assertThat(converted).isEqualTo(expected);
     assertThat(converted).isNotSameAs(expected);
     assertThat(collectLabels(BuildType.LABEL_LIST, converted)).containsExactlyElementsIn(expected);