Skip to content
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

Generate classpath entries for FQN references #19

Merged
merged 7 commits into from
Aug 14, 2023

Conversation

timtebeek
Copy link
Contributor

@timtebeek timtebeek commented Aug 14, 2023

What's changed?

Right now fully qualified references do not generate classpath entries on the JavaTemplate classes, since we only loop over imports to generate those. We expand that to include any type use of classes that need imports.

What's your motivation?

When we want to swap between similar classes we would want to use FQNs in the recipes for readability.

Any additional context

@timtebeek timtebeek added the enhancement New feature or request label Aug 14, 2023
@timtebeek timtebeek self-assigned this Aug 14, 2023
@timtebeek timtebeek marked this pull request as ready for review August 14, 2023 12:05
Copy link
Contributor

@knutwannheden knutwannheden left a comment

Choose a reason for hiding this comment

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

I think I saw that this also covers annotations, which is good. I suspect that we will at some point also have to traverse the indirectly referenced types (supertypes, return types, parameter types, etc.), but let's leave it at this for now.

@timtebeek
Copy link
Contributor Author

I think I saw that this also covers annotations, which is good. I suspect that we will at some point also have to traverse the indirectly referenced types (supertypes, return types, parameter types, etc.), but let's leave it at this for now.

Thanks for the quick review! Indeed I think we can iterate on this still, but since it's functional we can continue the work in those linked PRs and see what else pops up.

@timtebeek timtebeek merged commit 30c6f24 into main Aug 14, 2023
@timtebeek timtebeek deleted the template_classpath_entries_for_FQN_references branch August 14, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants