Fix Java annotation processor support to actually run processors#471
Open
oyvindberg wants to merge 2 commits intomasterfrom
Open
Fix Java annotation processor support to actually run processors#471oyvindberg wants to merge 2 commits intomasterfrom
oyvindberg wants to merge 2 commits intomasterfrom
Conversation
The previous implementation only added the `-s` option for generated sources but didn't actually enable annotation processing. This change: - Removes the simple enabled/disabled AnnotationProcessing model - Adds a new AnnotationProcessor model with required className field - Updates Java model to use JsonSet[AnnotationProcessor] - Passes explicit `-processor` options to javac with processor class names - Only adds `-proc:none` when no processors are configured - Updates tests to verify -processor option is generated - Documents the new feature in CLAUDE.md Breaking change: The old annotationProcessing.enabled field is replaced with an explicit list of annotation processors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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
This PR fixes Java annotation processor support in bleep. The previous implementation only added the
-soption for generated sources but didn't actually enable annotation processing - Bloop was adding-proc:nonewhich disabled it.Changes
AnnotationProcessing(enabled: Boolean)modelAnnotationProcessormodel with requiredclassNamefield (extensible for future features)Javamodel to useJsonSet[AnnotationProcessor]instead ofOption[AnnotationProcessing]GenBloopFilesto pass explicit-processoroptions to javac with comma-separated processor class names-proc:nonewhen no processors are configured-processoroption is correctly generatedBreaking Change
The old
annotationProcessing.enabledfield is replaced with an explicit list of annotation processors:Before:
After:
Test plan
-processoroption is generated🤖 Generated with Claude Code