Skip to content

Mark the file as modified when WPI removes a declaration annotation - #8175

Merged
mernst merged 2 commits into
typetools:masterfrom
mernst:wpi-remove-annotation-sets-modified
Sep 16, 2026
Merged

mernst merged 2 commits into
typetools:masterfrom
mernst:wpi-remove-annotation-sets-modified

Conversation

@mernst

@mernst mernst commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

WholeProgramInferenceJavaParserStorage.removeMethodDeclarationAnnotation() changes the annotations of a source file, but unlike every other mutator in the class -- including the adjacent addMethodDeclarationAnnotation(), which it otherwise mirrors -- it did not call setFileModified(). If no other change was made to the file, the file was not rewritten and the removal was lost.

🤖 Generated with Claude Code

`WholeProgramInferenceJavaParserStorage.removeMethodDeclarationAnnotation()`
changes the annotations of a source file, but unlike every other mutator in
the class (such as the adjacent `addMethodDeclarationAnnotation()`), it did
not call `setFileModified()`.  If no other change was made to the file, the
removal was not written out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 0ff53f09-3744-4a2d-b9c3-265234b075f4

📥 Commits

Reviewing files that changed from the base of the PR and between b87c803 and 815c496.

📒 Files selected for processing (2)
  • framework/src/main/java/org/checkerframework/common/wholeprograminference/WholeProgramInferenceJavaParserStorage.java
  • framework/src/main/java/org/checkerframework/common/wholeprograminference/WholeProgramInferenceScenesStorage.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mernst mernst self-assigned this Sep 15, 2026
The JavaParser storage marks the file as modified when a method
declaration annotation is removed; make the scenes (jaif) storage do the
same, so the two backends maintain the invariant consistently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mernst
mernst merged commit bb9bdd8 into typetools:master Sep 16, 2026
27 checks passed
@mernst
mernst deleted the wpi-remove-annotation-sets-modified branch September 16, 2026 03:36
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.

1 participant