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
Finish records support #4871
Merged
Merged
Finish records support #4871
Conversation
This file contains 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
…l directories ending in -records, thus encompassing the new lock-records directory.
…, method or field annotated as @DisbarUse, and a class which shows it works. This will be used for checking records.
… working properly.
…bs are not currently transferred to methods, fields and constructor parameters.
…ng annotations, rather than fetching them directly.
…ameters of canonical but non-compact constructors.
…onents across to the corresponding field, method and compact canonical constructor parameter.
mernst
requested changes
Aug 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks excellent. Thank you for tying up these loose ends!
I have just a few questions and comments; please see the review.
checker/src/test/java/org/checkerframework/checker/testchecker/disbaruse/DisbarUseVisitor.java
Outdated
Show resolved
Hide resolved
checker/src/test/java/org/checkerframework/checker/testchecker/disbaruse/DisbarUseVisitor.java
Outdated
Show resolved
Hide resolved
checker/src/test/java/org/checkerframework/checker/testchecker/disbaruse/DisbarUseChecker.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/framework/stub/AnnotationFileParser.java
Outdated
Show resolved
Hide resolved
All the comments have been addressed so I think it is ready to merge. |
mernst
approved these changes
Aug 19, 2021
smillst
approved these changes
Aug 20, 2021
Thanks again for the records feature! |
wmdietl
pushed a commit
to eisop/checker-framework
that referenced
this pull request
Sep 4, 2021
* Allow method annotations on compact constructors in stubs * Support automatic transfer from declaration annotations on record components in stubs to the corresponding field, method, and compact canonical constructor parameter. (Outside stubs this is done automatically by javac.)
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.
After #4802 there were two issues left to complete:
This PR (in combination with typetools/stubparser#72) adds support for both these items. I tried using some existing checkers for the testing but none have straightforward support for annotations on fields, methods and parameters. So I added my own simple test-only checker "DisbarUse" that gives an error when the element is used, in order to test this functionality.
I think with this, support for records is complete in all aspects, unless I've overlooked something.