gnodet commented on code in PR #1144:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/1144#discussion_r4139104227


##########
src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.java:
##########
@@ -915,6 +919,201 @@ private static boolean removeFirsts(Deque<Path> paths, 
Integer count) {
         }
     }
 
+    /**
+     * Compiles using the ABI-fingerprint incremental strategy. This method 
handles the full
+     * lifecycle: determining what to compile, running javac with the analysis 
TaskListener,
+     * cascading on ABI changes, and persisting state.
+     *
+     * @param compiler the compiler
+     * @param configuration the options to give to the Java compiler
+     * @param mojo the MOJO for configuration access
+     * @throws IOException if an error occurred while reading or writing a file
+     * @throws MojoException if the compilation failed
+     */
+    void compileWithAbiIncremental(JavaCompiler compiler, final Options 
configuration, final AbstractCompilerMojo mojo)
+            throws IOException {
+        if (compiler instanceof ForkedTool) {
+            logger.warn("ABI incremental strategy is not supported with forked 
compilation."
+                    + " Falling back to full compilation.");
+        }
+        var abiBuild = new AbiIncrementalBuild(outputDirectory);

Review Comment:
   Fixed in e79f971. Calling `abiBuild.invalidate()` right after construction 
when `ForkedTool` is detected, so `initialize()` deletes the stale state file 
and returns all files — making the full compilation fallback actually work.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to