fix(codegen-kotlin): import cross-package Table objects in MetadataStartupValidator#48
Merged
dmealing merged 1 commit intoJun 20, 2026
Conversation
…artupValidator KotlinValidatorGenerator emitted bare `<Entity>Table` references in the generated MetadataStartupValidator registry, but the Table objects live in their entity's own package (`partylore.arc.ActiveStoryArcTable`, …) while the validator is emitted into a single configured package. Any entity in a different package than the validator produced an "unresolved reference" compile error — i.e. every multi-package project. The validator now imports each Table object whose package differs from its own, mirroring the cross-package import handling in KotlinExposedTableGenerator. Adds a multi-package regression test; the existing single-package test is unchanged (no imports emitted when packages match). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dmealing
enabled auto-merge
June 20, 2026 06:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
KotlinValidatorGeneratoremitted the generatedMetadataStartupValidatorregistry with bare<Entity>Tablereferences and no imports:But each
<Entity>Tablelives in its entity's own package (partylore.arc.ActiveStoryArcTable,partylore.compliance.ConsentRecordTable, …), while the validator is emitted into a single configured package. Any entity in a different package than the validator → "unresolved reference" compile error. That's every real multi-package project (it surfaced wiring the startup validator over a 16-package domain).Fix
The validator now imports each Table object whose package differs from the validator's own package — exactly the cross-package import handling
KotlinExposedTableGeneratoralready does for FK targets.Tests
import acme.blog.AuthorTable/import acme.shop.OrderTableare emitted when entities live in different packages.🤖 Generated with Claude Code