Skip to content

Add javadoc comments into generated code #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

rbygrave
Copy link
Contributor

@rbygrave rbygrave commented Nov 3, 2020

No description provided.

 Fallback to using to using io.avaje.inject.spi.Generated when javax.annotation.processing.Generated is not available (Java8 & JPMS)
@@ -53,7 +53,7 @@
}

private String generatedAnnotation(boolean jdk8) {
return jdk8 ? null : isTypeAvailable(Constants.GENERATED_9) ? Constants.GENERATED_9 : null;
return jdk8 ? Constants.GENERATED_LOCAL : isTypeAvailable(Constants.GENERATED_9) ? Constants.GENERATED_9 : Constants.GENERATED_LOCAL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just switching to always using a local @Generated annotation regardless of the JDK version or if JPMS is in use?
I think that's what Lombok finally decided to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is pretty tempting. I've had a little discussion on the jigsaw mailing list about this and at this stage I'm pretty confident that we ultimately can't use javax.annotation.processing.Generated with JPMS so just using the local one makes more and more sense to me now.

@norrisjeremy
Copy link
Contributor

I like this too!

@rbygrave rbygrave added this to the 2.1 milestone Nov 3, 2020
@rbygrave rbygrave self-assigned this Nov 3, 2020
@rbygrave rbygrave merged commit 0480798 into master Nov 3, 2020
@rbygrave rbygrave deleted the feature/GeneratedJavadoc branch November 16, 2020 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants