Remove some unused code from FetchCommand that was pulling in JavaOptions
MOS_MIGRATED_REVID=143936734
@@ -25,7 +25,6 @@ import com.google.devtools.build.lib.query2.engine.OutputFormatterCallback;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.Setting;
import com.google.devtools.build.lib.query2.engine.QueryException;
import com.google.devtools.build.lib.query2.engine.QueryExpression;
-import com.google.devtools.build.lib.rules.java.JavaOptions;
import com.google.devtools.build.lib.runtime.BlazeCommand;
import com.google.devtools.build.lib.runtime.BlazeRuntime;
import com.google.devtools.build.lib.runtime.Command;
@@ -44,7 +43,6 @@ import java.io.IOException;
options = {
PackageCacheOptions.class,
FetchOptions.class,
- JavaOptions.class,
},
help = "resource:fetch.txt",
shortDescription = "Fetches external repositories that are prerequisites to the targets.",
@@ -89,15 +87,9 @@ public final class FetchCommand implements BlazeCommand {
// Querying for all of the dependencies of the targets has the side-effect of populating the
// Skyframe graph for external targets, which requires downloading them. The JDK is required to
// build everything but isn't counted as a dep in the build graph so we add it manually.
- JavaOptions javaOptions = options.getOptions(JavaOptions.class);
ImmutableList.Builder<String> labelsToLoad = new ImmutableList.Builder<String>()
.addAll(options.getResidue());
- // TODO(kchodorow): Remove this when OS X isn't as hacky about finding the JVM. Our test
- // framework currently doesn't set up the JDK normally on OS X, so attempting to fetch
- // tools/jdk:jdk will cause errors.
- labelsToLoad.add(String.valueOf(javaOptions.javaToolchain));
-
String query = Joiner.on(" union ").join(labelsToLoad.build());
query = "deps(" + query + ")";
