Skip to content

[gazelle]: Fix missed Java deps from static calls on bare class names#435

Open
shs96c wants to merge 2 commits into
bazel-contrib:mainfrom
shs96c:static-calls-on-bare-class-names
Open

[gazelle]: Fix missed Java deps from static calls on bare class names#435
shs96c wants to merge 2 commits into
bazel-contrib:mainfrom
shs96c:static-calls-on-bare-class-names

Conversation

@shs96c

@shs96c shs96c commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Gazelle was missing valid Java dependencies when static methods were called on bare class identifiers, especially in same-package references and imported acronym-style types like UUID. This caused underreported usedTypes, which can lead to incorrect dependency inference.

This change closes that gap so dependency detection better matches real Java usage patterns and avoids silently dropping required deps in common static-call code paths.

Gazelle was missing valid Java dependencies when static methods were called
on bare class identifiers, especially in same-package references and
imported acronym-style types like `UUID`. This caused underreported
`usedTypes`, which can lead to incorrect dependency inference.

This change closes that gap so dependency detection better matches real
Java usage patterns and avoids silently dropping required deps in
common static-call code paths.
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