Remove FilesToRunProvider.label.
The TransitiveInfoProvider already contains a label, use that instead.
--
MOS_MIGRATED_REVID=120443298
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/FilesToRunProvider.java b/src/main/java/com/google/devtools/build/lib/analysis/FilesToRunProvider.java
index 2dab4b3..35c0b9a 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/FilesToRunProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/FilesToRunProvider.java
@@ -18,7 +18,6 @@
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.EmptyRunfilesSupplier;
import com.google.devtools.build.lib.actions.RunfilesSupplier;
-import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
@@ -34,14 +33,15 @@
/** The name of the field in Skylark used to access this class. */
public static final String SKYLARK_NAME = "files_to_run";
- private final Label label;
+ public static final FilesToRunProvider EMPTY =
+ new FilesToRunProvider(ImmutableList.<Artifact>of(), null, null);
+
private final ImmutableList<Artifact> filesToRun;
@Nullable private final RunfilesSupport runfilesSupport;
@Nullable private final Artifact executable;
- public FilesToRunProvider(Label label, ImmutableList<Artifact> filesToRun,
+ public FilesToRunProvider(ImmutableList<Artifact> filesToRun,
@Nullable RunfilesSupport runfilesSupport, @Nullable Artifact executable) {
- this.label = label;
this.filesToRun = filesToRun;
this.runfilesSupport = runfilesSupport;
this.executable = executable;
@@ -50,17 +50,8 @@
/**
* Creates an instance that contains one single executable and no other files.
*/
- public static FilesToRunProvider fromSingleArtifact(Label label, Artifact artifact) {
- return new FilesToRunProvider(label, ImmutableList.of(artifact), null, artifact);
- }
-
- /**
- * Returns the label that is associated with this piece of information.
- *
- * <p>This is usually the label of the target that provides the information.
- */
- public Label getLabel() {
- return label;
+ public static FilesToRunProvider fromSingleExecutableArtifact(Artifact artifact) {
+ return new FilesToRunProvider(ImmutableList.of(artifact), null, artifact);
}
/**