RunfilesSupport: remove the sources manifest
This is unused in Bazel, and it's ~trivial to create one where needed.
PiperOrigin-RevId: 281297747
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java b/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java
index be87200..fef0eca 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java
@@ -81,7 +81,6 @@
private final Artifact runfilesInputManifest;
private final Artifact runfilesManifest;
private final Artifact runfilesMiddleman;
- private final Artifact sourcesManifest;
private final Artifact owningExecutable;
private final boolean buildRunfileLinks;
private final boolean runfilesEnabled;
@@ -130,7 +129,6 @@
}
Artifact runfilesMiddleman =
createRunfilesMiddleman(ruleContext, owningExecutable, runfiles, runfilesManifest);
- Artifact sourcesManifest = createSourceManifest(ruleContext, runfiles, owningExecutable);
boolean runfilesEnabled = ruleContext.getConfiguration().runfilesEnabled();
@@ -139,7 +137,6 @@
runfilesInputManifest,
runfilesManifest,
runfilesMiddleman,
- sourcesManifest,
owningExecutable,
buildRunfileLinks,
runfilesEnabled,
@@ -153,7 +150,6 @@
Artifact runfilesInputManifest,
Artifact runfilesManifest,
Artifact runfilesMiddleman,
- Artifact sourcesManifest,
Artifact owningExecutable,
boolean buildRunfileLinks,
boolean runfilesEnabled,
@@ -162,7 +158,6 @@
this.runfilesInputManifest = runfilesInputManifest;
this.runfilesManifest = runfilesManifest;
this.runfilesMiddleman = runfilesMiddleman;
- this.sourcesManifest = sourcesManifest;
this.owningExecutable = owningExecutable;
this.buildRunfileLinks = buildRunfileLinks;
this.runfilesEnabled = runfilesEnabled;
@@ -309,11 +304,6 @@
return runfilesMiddleman;
}
- /** Returns the Sources manifest. */
- public Artifact getSourceManifest() {
- return sourcesManifest;
- }
-
private static Artifact createRunfilesMiddleman(
ActionConstructionContext context,
Artifact owningExecutable,
@@ -383,31 +373,6 @@
}
/**
- * Creates an {@link Artifact} which writes the "sources only" manifest file.
- *
- * @param context the owner for the manifest action
- * @param runfiles the runfiles
- * @return the Artifact representing the file write action.
- */
- private static Artifact createSourceManifest(
- ActionConstructionContext context, Runfiles runfiles, Artifact owningExecutable) {
- // Put the sources only manifest next to the MANIFEST file but call it SOURCES.
- PathFragment executablePath = owningExecutable.getRootRelativePath();
- PathFragment sourcesManifestPath =
- executablePath
- .getParentDirectory()
- .getChild(executablePath.getBaseName() + ".runfiles.SOURCES");
- Artifact sourceOnlyManifest =
- context.getDerivedArtifact(sourcesManifestPath, context.getBinDirectory());
- context
- .getAnalysisEnvironment()
- .registerAction(
- new SourceManifestAction(
- ManifestType.SOURCES_ONLY, context.getActionOwner(), sourceOnlyManifest, runfiles));
- return sourceOnlyManifest;
- }
-
- /**
* Helper method that returns a collection of artifacts that are necessary for the runfiles of the
* given target. Note that the runfile symlink tree is never built, so this may include artifacts
* that end up not being used (see {@link Runfiles}).