Skip to content

feat(incremental): add Java declaration-coverage adapter - #711

Open
schteff wants to merge 1 commit into
Egonex-AI:mainfrom
schteff:feat/java-declaration-coverage
Open

schteff wants to merge 1 commit into
Egonex-AI:mainfrom
schteff:feat/java-declaration-coverage

Conversation

@schteff

@schteff schteff commented Oct 6, 2026 •

Copy link
Copy Markdown

Summary

Right now every deleted or moved Java method blocks incremental updates, because Java has no declaration-coverage adapter. This adds one, so real deletions go through and generated members still block.

What changed

  • Java is now a coverage language.
  • Records, enums and annotation types count as classes (Java only; TypeScript enums are untouched).
  • Anonymous, nested and local classes get their own scope, so their methods don't stand in for the outer class's methods.
  • References like imports, method calls and annotations are no longer mistaken for declarations.
  • Record components, enum constants and compact constructors still count as possible members.
  • Lombok annotations that generate methods (like @Getter or @Data) block method deletions on the annotated type. @Slf4j, @NonNull and Spring's @Value don't.

Known limits

  • Deleting a nested type, or a method on one, still stays unknown (the extractor only reads top-level types).
  • Deleting one of several overloads stays unknown.
  • Annotation processors other than Lombok aren't covered.

How I tested this

  • Added 11 Java cases to test_symbol_evidence_matrix.test.mjs. The 7 "deleted" cases fail without the change.

  • An older test used Java as its example of a language with no adapter, so I switched it to C#.

  • Ran an incremental update that used to block on a Java project. It now publishes.

  • pnpm lint

  • pnpm --filter @understand-anything/core test

  • pnpm test

  • Manual smoke test

Versioning

  • N/A, left for the maintainer to bump on merge

@schteff
schteff force-pushed the feat/java-declaration-coverage branch from d141cd8 to 3fe571f Compare October 6, 2026 07:30
Java deletions can now be confirmed instead of always blocking publication.
@schteff
schteff force-pushed the feat/java-declaration-coverage branch from 3fe571f to 38ef8a9 Compare October 6, 2026 07:36

This branch has not been deployed

No deployments
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