Make generated Kotlin classes internal#502
Merged
edward3h merged 1 commit intocasid:mainfrom Jan 15, 2026
Merged
Conversation
There are two reasons for this. The first is that there's no reason for these to be public. They are consumed entirely in the current compilation unit, and there's no reason for external code to ever reference these. This comes up when working in a large Spring/Micronaut project where smaller modules act as libraries to a final aggregate. The other reason to do this is that by making this classes public, it prevents them from being used with data classes that the developer declared as internal. The compiler will complain that the generated code exposes an internal class in a public API.
Contributor
Author
|
I should note that this also allows jte to be used with Kotlin projects that have |
edward3h
approved these changes
Jan 13, 2026
Collaborator
edward3h
left a comment
There was a problem hiding this comment.
Seems reasonable to me, and all the tests passed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #502 +/- ##
============================================
+ Coverage 91.17% 91.24% +0.06%
- Complexity 1223 1224 +1
============================================
Files 76 76
Lines 3174 3174
Branches 492 492
============================================
+ Hits 2894 2896 +2
+ Misses 169 168 -1
+ Partials 111 110 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
Not a kotlin user, but sounds reasonable to me. |
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.
There are two reasons for this. The first is that there's no reason for these to be public. They are consumed entirely in the current compilation unit, and there's no reason for external code to ever reference these. This comes up when working in a large Spring/Micronaut project where smaller modules act as libraries to a final aggregate.
The other reason to do this is that by making this classes public, it prevents them from being used with data classes that the developer declared as internal. The compiler will complain that the generated code exposes an internal class in a public API.