Skip to content

Resolve JuLC library sources by fully qualified class name#34

Merged
satran004 merged 4 commits into
mainfrom
fix/fqcn-library-source-resolution
May 20, 2026
Merged

Resolve JuLC library sources by fully qualified class name#34
satran004 merged 4 commits into
mainfrom
fix/fqcn-library-source-resolution

Conversation

@satran004

Copy link
Copy Markdown
Member

This PR fixes the remaining library source resolution limitation where OnchainLibrar classes were indexed by simple class name. That caused collisions when different packages contained libraries with the same simple name.

Changes:

  • Adds a LibrarySource model with FQCN, simple name, package name, resource path, and source.
  • Resolves library sources by FQCN instead of simple class name.
  • Supports Java-style resolution for explicit imports, same-package references, wildcard imports, fully-qualified static calls, and transitive library dependencies.
  • Reports ambiguity when an unqualified simple name matches multiple libraries.
  • Migrates compiler, annotation processor, testkit, CLI, and playground call sites.
  • Updates project scanning so duplicate library simple names in different packages are preserved.
  • Adds Gradle plugin validation that bundled @onchainlibrary package/type declarations match their resource path.
  • Adds tests covering duplicate simple names, import precedence, wildcard imports, FQCN static calls, ambiguity diagnostics, same-package transitive discovery, and bundle validation.

satran004 added 3 commits May 18, 2026 21:59
Add a LibrarySource model and migrate library discovery/resolution to key sources by FQCN instead of simple class name. This fixes collisions between libraries with the same simple name in different packages while preserving explicit import, same-package, wildcard import, and fully-qualified static reference resolution.

Also validate bundled @onchainlibrary sources so the declared package and top-level type match the resource path, and extend tests across compiler, annotation processor, testkit, CLI, playground, and Gradle plugin flows.
@satran004 satran004 changed the base branch from main to fix/library_gradle_plugin_index_txt May 19, 2026 15:38
Base automatically changed from fix/library_gradle_plugin_index_txt to main May 20, 2026 08:26
@satran004 satran004 merged commit 2a3059b into main May 20, 2026
@satran004 satran004 deleted the fix/fqcn-library-source-resolution branch May 20, 2026 08:34
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