Files
rtk-ai__rtk/tests/fixtures/mvn_test_compile_fail_slice_raw.txt
Vinicius Dufloth 97bd2a7787 fix(mvn): preserve compile-error continuation in filter_surefire
When `mvn test` fails at the compile step before Surefire runs, the
`[ERROR]` block's indented `symbol:` / `location:` / `^` continuation
lines were being dropped. `filter_surefire` had no `keep_continuation`
state, unlike `filter_compile:302` and `filter_package:408`.

Add the missing state machine: reset in the RUNNING branch, set on each
kept `[ERROR]` line (except `Tests run:` / `Failures:` / `Errors:`
headers — same predicate as `filter_package:402-405`), and pass through
indented continuation lines before the outside-block keep-list check.

Fixture `mvn_test_compile_fail_slice_raw.txt` captures the
`mvn test` slice for a project with a deliberate `cannot find symbol`
in a `src/main/java` source. New tests:
- `surefire_keeps_compile_continuation_on_test_phase` — the bug.
- `package_still_keeps_compile_error_continuation_after_refactor` —
  drift guard on the `install`/`verify` path.
2026-05-25 12:05:01 -03:00

30 lines
1.6 KiB
Plaintext

[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< commons-cli:commons-cli >-----------------------
[INFO] Building Apache Commons CLI 1.11.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- compiler:3.15.0:compile (default-compile) @ commons-cli ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 37 source files with javac [debug release 8] to target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] src/main/java/org/apache/commons/cli/CompileBreaker.java:[21,16] cannot find symbol
symbol: variable bar
location: class org.apache.commons.cli.CompileBreaker
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.214 s
[INFO] Finished at: 2026-05-21T15:02:31Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project commons-cli: Compilation failure
[ERROR] /home/runner/commons-cli/src/main/java/org/apache/commons/cli/CompileBreaker.java:[21,16] cannot find symbol
[ERROR] symbol: variable bar
[ERROR] location: class org.apache.commons.cli.CompileBreaker
[ERROR] -> [Help 1]