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

Update versions and fix style #16

Merged
merged 14 commits into from
Jan 17, 2025
Merged

Update versions and fix style #16

merged 14 commits into from
Jan 17, 2025

Conversation

wmdietl
Copy link
Contributor

@wmdietl wmdietl commented Jan 16, 2025

No description provided.

@@ -106,10 +106,10 @@ protected boolean canUpdate(Node lhsNode, Node rhsNode, CFValue lhsValue) {
atypeFactory.getAnnotationMirror(rhsNode.getTree(), Unique.class);
if (lhsAMUnique != null && rhsAMUnique != null && lhsValue != null) {
for (AnnotationMirror lhsAnno : lhsValue.getAnnotations()) {
if (AnnotationUtils.areSameByName(atypeFactory.UNIQUE, lhsAnno)) {
if (AnnotationUtils.areSameByName(linearAtypeFactory.UNIQUE, lhsAnno)) {
List<String> lhsStatesList =
AnnotationUtils.getElementValueArray(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The deprecated version that takes the executable name allows getting default value, by passing true as last argument.
The suggested replacement only takes a default value, leading to duplication between the qualifier declaration and all these uses.
This use doesn't provide a default, which can fail at runtime.
I've filed eisop/checker-framework#1064 to clean this up.

@@ -36,7 +36,7 @@ public boolean updateNodeValues(Node node, TransferResult<CFValue, CFStore> tran

// TODO: there is a bug, the lhs node should be updated later, think about a way to do it.
if (node instanceof AssignmentNode) {
Node rhsNode = ((AssignmentNode) node).getExpression();
// Node rhsNode = ((AssignmentNode) node).getExpression();
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we are not using this variable, should we delete it instead of comment out?

annotationMirror, atypeFactory.ensureUniqueValueElement, String.class);
// TODO: there currently is no example for this error.
// The check does not pass Error Prone - there is a mismatch between what postStates contains
// and what transition.get returns.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks really bad as we don't have any test cases for it:(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's what the TODO comment says.
I filed #18 for this.

@wmdietl wmdietl merged commit e82e58e into master Jan 17, 2025
6 checks passed
@wmdietl wmdietl deleted the updates branch January 17, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants