Extension to generate NullMarked package-info#550
Conversation
|
The "Validate External Links" failure is because this change adds a new documentation page and links to it. |
|
Also I messed up the commit history 👎🏻 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #550 +/- ##
============================================
+ Coverage 91.17% 91.19% +0.01%
- Complexity 1223 1226 +3
============================================
Files 76 76
Lines 3185 3190 +5
Branches 489 491 +2
============================================
+ Hits 2904 2909 +5
Misses 173 173
Partials 108 108 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
37049b9 to
4037b2f
Compare
| .collect(Collectors.toList()); | ||
| } | ||
|
|
||
| private Path writePackageInfo(Path sourcesRoot, String packageName) { |
There was a problem hiding this comment.
Should we annotate packages or rather the generated classes? What if you want to progressively upgrade to nullmarked? Should we have annotations on templates similar like annotations on parameters?
There was a problem hiding this comment.
@NullMarked is applied at class, package or module level. While a template is generated into a class, in practice it behaves as a single method. Therefore, a package is the right level. (Since we aren't supporting modules.)
So the question is, do we want a way to include or exclude by package?
If you want more progressive, add @NonNull or @Nullable to individual params.
There was a problem hiding this comment.
@kelunik Do you have any more thoughts on this?
Addresses reviewer feedback: aligns Java package name with the module name (jte-jspecify-nullmarked). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Pretty cool! I have recently released the jte plugin with the annotation support you have added. I'd wait with the next jte release for this PR, then we'll have a very nice feature set to release. |
Base branch was bumped to 3.2.5-SNAPSHOT after this PR was created, causing CI to fail with an unresolvable parent POM error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
To help with JSpecify support, #528
Adds a new extension, jte-nullmarked. When enabled, it will generate a
package-info.javain each package of generated template code, with the@NullMarkedannotation.