Repository navigation
Conversation
-proc:<value> was only added inside the block guarding explicit annotation processors and processor paths. With <proc>none</proc> (or only) and none of those options set, the option was therefore silently dropped and ECJ still discovered processors from META-INF/services on the classpath. Move the -proc handling after that conditional block, while keeping it in the Java 6+ branch. Behavior without proc is unchanged, and explicit processor arguments keep their existing order. Add regression tests using real ECJ compilations for -proc:none (invalid service provider must not be loaded) and -proc:only (sources must not be compiled).
RoiSoleil
marked this pull request as ready for review
October 24, 2026 19:04
RoiSoleil
marked this pull request as draft
October 24, 2026 19:12
RoiSoleil
marked this pull request as ready for review
October 24, 2026 20:19
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EclipseJavaCompileronly passed-proc:<value>to ECJ when an explicit annotation processor, processor path, or processor module path was configured. As a result,<proc>none</proc>and<proc>only</proc>were ignored in the common case where processors are discovered from the classpath. ECJ could then try to load an unavailable processor and fail withServiceConfigurationError.This moves the
config.getProc()handling outside the condition that requires explicit processor configuration, while keeping it inside the existing!isPreJava1_6(config)block.Fixes #528.
Tests
Added regression tests in
EclipseJavaCompilerTest:procNoneDisablesAnnotationProcessorDiscoveryWithoutExplicitProcessorscompiles a source withproc = nonewhile an invalidMETA-INF/services/javax.annotation.processing.Processoris present on the output classpath. It fails before this change withServiceConfigurationErrorand succeeds after it.procOnlyIsPassedToEcjWithoutExplicitProcessorschecks thatproc = onlyprevents class generation.Validation performed with JDK 21, Maven 3.9.12, and ECJ 3.46.100:
mvn -pl plexus-compilers/plexus-compiler-eclipse -am test: success (Eclipse module: 19 tests; API module: 18 tests).spotless:checkandgit diff --check: clean.The integration-test module was not run.