Skip to content

Commit

Permalink
Fix --post_processor handling after a991d69
Browse files Browse the repository at this point in the history
`--post_processor` takes a list of arguments, not just one.

PiperOrigin-RevId: 648622655
  • Loading branch information
java-team-github-bot authored and Javac Team committed Jul 2, 2024
1 parent 73d0d1f commit 3f51235
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion java/com/google/turbine/options/TurbineOptionsParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,13 @@ private static void parse(TurbineOptions.Builder builder, Deque<String> argument
case "--experimental_fix_deps_tool":
case "--strict_java_deps":
case "--native_header_output":
case "--post_processor":
// accepted (and ignored) for compatibility with JavaBuilder command lines
readOne(next, argumentDeque);
break;
case "--post_processor":
// accepted (and ignored) for compatibility with JavaBuilder command lines
ImmutableList<String> unused = readList(argumentDeque);
break;
case "--compress_jar":
// accepted (and ignored) for compatibility with JavaBuilder command lines
break;
Expand Down
9 changes: 8 additions & 1 deletion javatests/com/google/turbine/options/TurbineOptionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,16 @@ public void javaBuilderCompatibility() throws Exception {
"ignored",
"--compress_jar",
"--post_processor",
"jacoco")));
"jacoco",
"paths-for-coverage.txt",
"coverage-metadata",
"-*Test",
"-*TestCase",
"--classpath",
"lib.jar")));
assertThat(options.outputDeps()).hasValue("output_deps.proto");
assertThat(options.gensrcOutput()).hasValue("generated_sources.jar");
assertThat(options.classPath()).containsExactly("lib.jar");
}

@Test
Expand Down

0 comments on commit 3f51235

Please sign in to comment.