support-query-builder 0.3.0 KSP issue body
Description of Bug
support-query-builder 0.3.0 appears to stop generating *EntitySchema objects for @EntitySchema-annotated top-level Room entities after the processor migration from KAPT to KSP.
The failure was found while updating anitrend-v2 from 0.2.13 to 0.3.0 in PR https://github.com/AniTrend/anitrend-v2/pull/1186.
Current CI failure:
e: file:///home/runner/work/anitrend-v2/anitrend-v2/data/src/main/kotlin/co/anitrend/data/tag/entity/filter/TagQueryFilter.kt:38:17 Unresolved reference 'TagEntitySchema'.
Failing job:
https://github.com/AniTrend/anitrend-v2/actions/runs/25968654463/job/76336658615
Reproduction Steps
- Update a consumer project from
support-query-builder 0.2.13 to 0.3.0.
- Fix the published artifact rename introduced in
0.3.0:
- Update the consumer processor wiring from KAPT to KSP:
- add
com.google.devtools.ksp
- change
kapt(libs.anitrend.querybuilder.processor) to ksp(libs.anitrend.querybuilder.processor)
- Compile a module containing top-level Room
@Entity classes annotated with @EntitySchema.
- Observe that no generated
*EntitySchema files are emitted and downstream Kotlin compilation fails on unresolved schema references.
Consumer-side observations from anitrend-v2:
- many
@EntitySchema declarations still exist under data/src/main/kotlin/...
:data:kspDebugKotlin executes
- no
data/build/generated/ksp directory is created
- no generated
TagEntitySchema file appears
Screenshots/Videos
Not applicable.
Device & Build Information
- OS Version: Ubuntu GitHub Actions runner
- App Version: not applicable, library consumer build failure
- Phone Model: not applicable
- Phone Brand: not applicable
Download Source:
Additional Context
Release evidence:
https://github.com/AniTrend/support-query-builder/releases/tag/0.3.0
https://github.com/AniTrend/support-query-builder/compare/0.2.13...0.3.0
Relevant release changes:
feat: add new symbol processor (#280)
build: smoke test and production testing for Dokka and KSP (#436)
What was already verified:
- The initial consumer failure caused by artifact changes was fixed locally:
annotations, core, ext, and processor now resolve at 0.3.0
- The published
processor-0.3.0.jar appears structurally valid and contains:
Processor.class
Provider.class
META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider
- After switching the consumer from KAPT to KSP, generation still produces no
*EntitySchema outputs.
One suspicious code path in Processor.kt:
valid
.filterIsInstance<KSClassDeclaration>()
.groupBy { it.parentDeclaration?.qualifiedName?.asString() }
.values
.forEach { classDeclarations ->
entitySchemaCodeGenerator(
resolver = resolver,
classDeclarations = classDeclarations
)
}
For top-level declarations, parentDeclaration is typically null. That may be harmless, but it is a large behavior change in the KSP migration and seems worth checking first.
Suggested next check upstream:
- add a minimal KSP integration test using a top-level Room
@Entity annotated with @EntitySchema
- assert that a
TagEntitySchema-style object is generated
Local handover doc with fuller investigation notes:
docs/superpowers/plans/2026-05-17-support-query-builder-ksp-root-cause-handover.md
support-query-builder 0.3.0 KSP issue body
Description of Bug
support-query-builder0.3.0appears to stop generating*EntitySchemaobjects for@EntitySchema-annotated top-level Room entities after the processor migration from KAPT to KSP.The failure was found while updating
anitrend-v2from0.2.13to0.3.0in PRhttps://github.com/AniTrend/anitrend-v2/pull/1186.Current CI failure:
Failing job:
https://github.com/AniTrend/anitrend-v2/actions/runs/25968654463/job/76336658615Reproduction Steps
support-query-builder0.2.13to0.3.0.0.3.0:core-ext->extcom.google.devtools.kspkapt(libs.anitrend.querybuilder.processor)toksp(libs.anitrend.querybuilder.processor)@Entityclasses annotated with@EntitySchema.*EntitySchemafiles are emitted and downstream Kotlin compilation fails on unresolved schema references.Consumer-side observations from
anitrend-v2:@EntitySchemadeclarations still exist underdata/src/main/kotlin/...:data:kspDebugKotlinexecutesdata/build/generated/kspdirectory is createdTagEntitySchemafile appearsScreenshots/Videos
Not applicable.
Device & Build Information
Download Source:
Additional Context
Release evidence:
https://github.com/AniTrend/support-query-builder/releases/tag/0.3.0https://github.com/AniTrend/support-query-builder/compare/0.2.13...0.3.0Relevant release changes:
feat: add new symbol processor (#280)build: smoke test and production testing for Dokka and KSP (#436)What was already verified:
annotations,core,ext, andprocessornow resolve at0.3.0processor-0.3.0.jarappears structurally valid and contains:Processor.classProvider.classMETA-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider*EntitySchemaoutputs.One suspicious code path in
Processor.kt:valid .filterIsInstance<KSClassDeclaration>() .groupBy { it.parentDeclaration?.qualifiedName?.asString() } .values .forEach { classDeclarations -> entitySchemaCodeGenerator( resolver = resolver, classDeclarations = classDeclarations ) }For top-level declarations,
parentDeclarationis typicallynull. That may be harmless, but it is a large behavior change in the KSP migration and seems worth checking first.Suggested next check upstream:
@Entityannotated with@EntitySchemaTagEntitySchema-style object is generatedLocal handover doc with fuller investigation notes:
docs/superpowers/plans/2026-05-17-support-query-builder-ksp-root-cause-handover.md