gnodet commented on PR #1144: URL: https://github.com/apache/maven-compiler-plugin/pull/1144#issuecomment-5887551667
Thanks for the review @rmannibucau. Two points: **ASM vs ClassFile API:** Replied inline — the short version is that the ClassFile API (`java.lang.classfile`) was only finalized in JDK 24, and we target JDK 17. ASM is already a dependency (`ByteCodeTransformer`). Happy to add a dual-path implementation (ClassFile API preferred on JDK 24+, ASM fallback) if you think it's worth the added complexity now, or track it as a follow-up issue. **"does ABI work since it ignores bodies?":** Yes, that's exactly the point — and it's well-established. ABI (Application Binary Interface) fingerprinting deliberately ignores method bodies because downstream dependents can only depend on the *signatures*, not the implementation. If you change a method body but keep the same return type, parameter types, exceptions, and modifiers, no downstream class needs to be recompiled — the JVM spec guarantees binary compatibility. This is the same principle used by: - Gradle's ABI-based incremental compilation (since Gradle 3.4) - Eclipse JDT's structural delta detection - Zinc (sbt) incremental compiler The fingerprint covers: class modifiers, superclass/interfaces, non-private fields (types + constant values for inlined `static final`), non-private methods (return type, parameter types, exception types, modifiers), and annotations. A change to any of those means the ABI changed → dependents are recompiled. A change to only method bodies → fingerprint stays the same → dependents are *not* recompiled → faster builds. The `AbiExtractor` (javac element API, used during compilation) and `BytecodeAnalyzer` (ASM, used for external deps) both produce canonical forms that capture exactly this surface. -- 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]
