typetools / typetools/checker-framework

Properly implement -AstubWarnIfConflictsBytecode

Open
#2,759 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

Option -AstubWarnIfOverwritesBytecode should "print warnings about stub files that overwrite annotations from bytecode".

However, the implementation of that feature is currently guarded by if (false)
https://github.com/typetools/checker-framework/blob/4fa56bdd321485e453f2020eb8e4e5a5586a01f7/framework/src/main/java/org/checkerframework/framework/stub/StubParser.java#L772

The implementation of the feature can build on #2758, which adds warnings for redundant stub specifications.
An "overwrites bytecode" warning should be issued for a specification that is not redundant and where the bytecode has at least one annotation that differs from the stub specification.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in framework/src/main/java/org/checkerframework/framework/stub/StubParser.java around line 772, where the disabled implementation is guarded by if (false). Read issue #2758 for the redundant-stub warning behavior. Done means non-redundant stub specifications produce an overwrite warning when bytecode contains a differing annotation, while redundant specifications do not.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.