typetools / typetools/checker-framework

Print nullness or initialization type qualifiers, but not both, in error messages

Open
#2,276 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When printing the "found" and "required" messages, show only, and all, the qualifiers from the relevant type hierarchy. In particular: If the problem is due to nullness, don't print @Initialized in types, which clutters the output.

This would be a big refactoring since they are both in the same type system and there is one isSubtype method that returns a boolean, without giving more information.

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 by tracing the error-message code that prints the “found” and “required” types, then inspect the shared type hierarchy and its boolean isSubtype method. Done means nullness errors print only the relevant nullness qualifiers, initialization errors print only their qualifiers, and each message includes all qualifiers from that hierarchy.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.