Skip to content

[gazelle] Improve split-package resolution with parser and Go plumbing#424

Open
shs96c wants to merge 1 commit into
bazel-contrib:mainfrom
shs96c:pr-g-split-package-core
Open

[gazelle] Improve split-package resolution with parser and Go plumbing#424
shs96c wants to merge 1 commit into
bazel-contrib:mainfrom
shs96c:pr-g-split-package-core

Conversation

@shs96c
Copy link
Copy Markdown
Collaborator

@shs96c shs96c commented Feb 12, 2026

Track same-package type references and defined classes (including inner classes) through the Java parser, protobuf interface, and Go-side consumption. This improves dependency resolution when Java packages are split across multiple Bazel packages.

Track same-package type references and defined classes (including inner
classes) through the Java parser, protobuf interface, and Go-side
consumption. This improves dependency resolution when Java packages are
split across multiple Bazel packages.

Key changes:
- Java parser: track samePackageTypeReferences and definedClasses,
  handle class literals (Foo.class), static type imports, type
  parameters in scope, and private inner class filtering
- Protobuf: add same_package_type_references and defined_classes fields
- Go plumbing: map new proto fields, add DefinedClasses to Package,
  add BareInnermostClassName() for inner class resolution
- Resolution: use DefinedClasses for exported class tracking, improve
  non-local import filtering for split packages, index by innermost
  class name, add dedup helpers
@shs96c shs96c force-pushed the pr-g-split-package-core branch from 7782f43 to b629494 Compare February 12, 2026 17:41
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