Skip to content

Commit

Permalink
Remove unused parameters of createCommandLineFromToolchains.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 412825461
  • Loading branch information
comius authored and copybara-github committed Nov 29, 2021
1 parent 11877e3 commit 0c32009
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ private SpawnAction.Builder createAction() throws MissingPrerequisiteException {
return result;
}

private static String getOutputDirectory(RuleContext ruleContext) {
return ruleContext.getBinDirectory().getExecPath().getSegment(0);
}

/** Commandline generator for protoc invocations. */
@VisibleForTesting
CustomCommandLine.Builder createProtoCompilerCommandLine() {
Expand Down Expand Up @@ -412,8 +408,6 @@ private static SpawnAction.Builder createActions(
}
}

boolean siblingRepositoryLayout = ruleContext.getConfiguration().isSiblingRepositoryLayout();

result
.addOutputs(outputs)
.setResources(AbstractAction.DEFAULT_RESOURCE_SET)
Expand All @@ -422,14 +416,12 @@ private static SpawnAction.Builder createActions(
.addCommandLine(
createCommandLineFromToolchains(
toolchainInvocations,
getOutputDirectory(ruleContext),
protoInfo,
ruleLabel,
areDepsStrict(ruleContext) ? Deps.STRICT : Deps.NON_STRICT,
arePublicImportsStrict(ruleContext) ? useExports : Exports.DO_NOT_USE,
allowServices,
protoToolchain.getCompilerOptions(),
siblingRepositoryLayout),
protoToolchain.getCompilerOptions()),
ParamFileInfo.builder(ParameterFileType.UNQUOTED).build())
.setProgressMessage("Generating %s proto_library %s", flavorName, ruleContext.getLabel());

Expand Down Expand Up @@ -460,14 +452,12 @@ public static boolean arePublicImportsStrict(RuleContext ruleContext) {
*/
private static CustomCommandLine createCommandLineFromToolchains(
List<ToolchainInvocation> toolchainInvocations,
String outputDirectory,
ProtoInfo protoInfo,
Label ruleLabel,
Deps strictDeps,
Exports useExports,
Services allowServices,
ImmutableList<String> protocOpts,
boolean siblingRepositoryLayout) {
ImmutableList<String> protocOpts) {
CustomCommandLine.Builder cmdLine = CustomCommandLine.builder();

cmdLine.addAll(
Expand Down

0 comments on commit 0c32009

Please sign in to comment.