You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "HuzaifaChaudary (via GitHub)" <gi...@apache.org> on 2026/09/05 17:47:31 UTC

[PR] Concurrent executor ignores java.lang.Error subclasses [maven]

HuzaifaChaudary opened a new pull request, #13055:
URL: https://github.com/apache/maven/pull/13055

   Closes #10415 , which is MNG-8678 .
   
   the concurrent builder wraps every step in `catch (Exception e)` , so a step that throws an
   `Error` is not caught at all . `step.status` never moves off `SCHEDULED` and `step.exception`
   stays null , so `isDone()` is false , the project's teardown step never becomes eligible ,
   `handleBuildError` never runs and nothing is added to the result . the build finishes with an
   empty exception list and prints BUILD SUCCESS .
   
   the worker thread dies , but `PhasingExecutor.execute` decrements the active count in a
   `finally` , so nothing hangs either . it just quietly succeeds .
   
   the rest of the machinery already handles this . `handleBuildError` has a branch whose comment
   says *fail fast on RuntimeExceptions, Errors and "other" Throwables* , and the `failures` list
   is already `List<Throwable>` . only the plumbing feeding it was narrowed to `Exception` . the
   sequential builder catches `Throwable` , which is the inconsistency the report names .
   
   so this widens the two catches and the field they write to . six lines .
   
   i left `BuildContext.execute()` alone even though it also catches only `Exception` , because
   `DefaultMaven` catches `RuntimeException` , so an error on the main thread still propagates
   rather than turning into a success . that path does not produce this symptom .
   
   two tests . one throws an `Error` from a build step and asserts it reaches
   `getResult().getExceptions()` , which fails without the change with *expected the error to be
   recorded, but got: []* . the other throws a `RuntimeException` , which already worked , so a
   change that was too wide would show up there .
   
   `mvn -pl impl/maven-core test` is 683 passing , 0 failures , and spotless and checkstyle are
   bound in that run and clean .
   
   i have not run the core integration tests , they live in another repo and need a full
   distribution build .
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Concurrent executor ignores java.lang.Error subclasses [maven]

Posted by "HuzaifaChaudary (via GitHub)" <gi...@apache.org>.
HuzaifaChaudary commented on PR #13055:
URL: https://github.com/apache/maven/pull/13055#issuecomment-5561442665

   you are right . once there is more than one failure the wrapper is a checked exception , so the error inside it stops counting as fatal and under -fae the project is only blacklisted . pushed a fix that reads the halt from the failures rather than from the wrapper . with a single failure it comes out to the same check as before , so nothing else moves . the new test fails without it .
   
   being straight about the test though , it does not drive a real after:* failure . a step with no mojo cannot be made to throw in this harness , so the second failure is put on the after:validate step the same way the cleanup catch stores it . the collecting , the wrapping and the halt decision all run for real , but the cleanup step is not what raises it .
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Concurrent executor ignores java.lang.Error subclasses [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #13055:
URL: https://github.com/apache/maven/pull/13055


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org