#1382 make TYPE_USE annotations visible as dependencies#1666
Draft
winfriedgerlach wants to merge 1 commit into
Draft
#1382 make TYPE_USE annotations visible as dependencies#1666winfriedgerlach wants to merge 1 commit into
winfriedgerlach wants to merge 1 commit into
Conversation
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.
Many of you will have the same problem I have: migrating to JSpecify and making sure that no-one uses "the wrong nullability" annotations. Enforcing this is currently not possible with ArchUnit, since at least the Checker Framework annotations are also
TYPE_USEannotations (like JSpecify), and thus are "invisible" to ArchUnit. (I had to use CheckStyle RegExes to achieve the desired result)It turns out that solving this issue for ArchUnit is not that hard, it took Claude around 20 minutes. I just want to show the result to you for discussion - I am aware that this is not "mergeable" in its current state and other questions around JSpecify raised in #1382 need the exact position of the annotations as well, which is much more complicated. See https://github.com/TNG/ArchUnit/blob/0469f887876b311a7e63a077c2f96133f0ee316c/type-use-annotations-summary.md