Skip to content

Commit

Permalink
Remove unused Java references.
Browse files Browse the repository at this point in the history
Part of a Bazel dead code cleanup.

PiperOrigin-RevId: 532547910
Change-Id: Idcc28b35f0a79a85f4109db1c9f3cd67f5fd2bb7
  • Loading branch information
gregestren authored and fweikert committed May 25, 2023
1 parent 7baffb8 commit db1ed70
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ public ArtifactsInOutputGroup getArtifacts(String outputGroup) {
return artifactOutputGroups.get(outputGroup);
}

public ImmutableMap<String, ArtifactsInOutputGroup> getOutputGroups() {
return artifactOutputGroups;
}

public CompletionContext getCompletionContext() {
return completionContext;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,6 @@ public static ImmutableMap<String, ExecGroup> process(
public abstract static class Builder {
public abstract ImmutableMap<String, ExecGroup> execGroups();

public ImmutableSet<String> getExecGroupNames() {
return execGroups().keySet();
}

public ExecGroup getExecGroup(String name) {
return execGroups().get(name);
}

public ExecGroupCollection build(
@Nullable ToolchainCollection<ResolvedToolchainContext> toolchainContexts,
ImmutableMap<String, String> rawExecProperties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ public Path getRunfilesDirectory() {
return null;
}

@Nullable
public Runfiles getRunfiles() {
if (runfilesSupport != null) {
return runfilesSupport.getRunfiles();
}
return null;
}

@Nullable
public Artifact getExecutable() {
return executable;
Expand Down Expand Up @@ -305,10 +297,6 @@ public ArtifactsInOutputGroup getOutputGroup(String outputGroup) {
return outputs.get(outputGroup);
}

public ImmutableMap<String, ArtifactsInOutputGroup> getOutputs() {
return outputs;
}

// TODO(aehlig): remove as soon as we managed to get rid of the deprecated "important_output"
// field.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,26 +537,6 @@ interface ThreadSafeMutableSet<T> extends Set<T> {}
/** Returns a fresh {@link ThreadSafeMutableSet} instance for the type {@code T}. */
ThreadSafeMutableSet<T> createThreadSafeMutableSet();

/**
* A simple map-like interface that uses proper equality semantics for the key type. {@link
* QueryExpression}/{@link QueryFunction} implementations should use {@code
* ThreadSafeMutableSet<T, V>} they need a map-like data structure for {@code T}.
*/
interface MutableMap<K, V> {
/**
* Returns the value {@code value} associated with the given key by the most recent call to
* {@code put(key, value)}, or {@code null} if there was no such call.
*/
@Nullable
V get(K key);

/**
* Associates the given key with the given value and returns the previous value associated with
* the key, or {@code null} if there wasn't one.
*/
V put(K key, V value);
}

/**
* Creates a Uniquifier for use in a {@code QueryExpression}. Note that the usage of this
* uniquifier should not be used for returning unique results to the parent callback. It should
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import com.google.devtools.build.lib.actions.cache.OutputMetadataStore;
import com.google.devtools.build.lib.actions.cache.VirtualActionInput;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.ExtendedEventHandler.Postable;
import com.google.devtools.build.lib.events.Reporter;
import com.google.devtools.build.lib.remote.common.CacheNotFoundException;
import com.google.devtools.build.lib.remote.util.AsyncTaskCache;
Expand Down Expand Up @@ -573,19 +572,6 @@ public void shutdown() {
}
}

/** Event which is fired when inputs for local action are eagerly prefetched. */
public static class InputsEagerlyPrefetched implements Postable {
private final List<Artifact> artifacts;

public InputsEagerlyPrefetched(List<Artifact> artifacts) {
this.artifacts = artifacts;
}

public List<Artifact> getArtifacts() {
return artifacts;
}
}

public void finalizeAction(Action action, OutputMetadataStore outputMetadataStore)
throws IOException, InterruptedException {
List<Artifact> outputsToDownload = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ public J2ObjcAspect(RuleDefinitionEnvironment env, CppSemantics cppSemantics) {
this.javaToolchainTypeRequirement = JavaRuleClasses.javaToolchainTypeRequirement(env);
}

/** Returns whether this aspect allows proto services to be generated from this proto rule */
protected boolean shouldAllowProtoServices(RuleContext ruleContext) {
return true;
}

@Override
public AspectDefinition getDefinition(AspectParameters aspectParameters) {
return ConfigAwareAspectBuilder.of(new AspectDefinition.Builder(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,6 @@ public NestedSet<Artifact> getFiles() throws EvalException {
}
}

@Nullable
public Artifact getCoverageTool() throws EvalException {
return info.getValue("coverage_tool", Artifact.class);
}

@Nullable
public NestedSet<Artifact> getCoverageToolFiles() throws EvalException {
Object value = info.getValue("coverage_files");
return Depset.cast(value, Artifact.class, "coverage_files");
}

public PythonVersion getPythonVersion() throws EvalException {
return PythonVersion.parseTargetValue(info.getValue("python_version", String.class));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.TargetPattern;
import com.google.devtools.build.lib.events.ExtendedEventHandler;
Expand Down Expand Up @@ -152,12 +150,6 @@ public AbstractBlazeQueryEnvironment<Target> create(
protected Iterable<QueryFunction> getExtraQueryFunctions() {
return ImmutableList.of();
}

@Override
protected BuildOptions getDefaultBuildOptions(ConfiguredRuleClassProvider ruleClassProvider) {
return BuildOptions.getDefaultBuildOptionsForFragments(
ruleClassProvider.getFragmentRegistry().getOptionsClasses());
}
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.analysis.ServerDirectories;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.analysis.util.AnalysisMock;
import com.google.devtools.build.lib.bazel.bzlmod.BazelLockFileFunction;
import com.google.devtools.build.lib.bazel.bzlmod.BazelModuleResolutionFunction;
Expand Down Expand Up @@ -428,9 +427,6 @@ protected SkyframeExecutor createSkyframeExecutor(ConfiguredRuleClassProvider ru
return skyframeExecutor;
}

protected abstract BuildOptions getDefaultBuildOptions(
ConfiguredRuleClassProvider ruleClassProvider);

@Override
public void assertPackageNotLoaded(String packageName) throws Exception {
MemoizingEvaluator evaluator = skyframeExecutor.getEvaluator();
Expand Down

0 comments on commit db1ed70

Please sign in to comment.