Repository navigation
fix(manifest): emit Kotlin, Android and sbt base-dir sources - #1662
Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 1 commit intoOct 28, 2026
Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 1 commit into
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 1 commit into
Conversation
Reachability treats a JVM project with no source or class files as having no code, so code the facts producers fail to report is silently skipped. - Gradle: Kotlin source sets and class dirs of JVM and Android Kotlin compilations (Kotlin Multiplatform's commonMain/jvmMain included), and Android source sets plus the javac and Kotlin compile tasks' outputs. AGP's built-in Kotlin leaves the compilations' class dirs empty, so those come from the compile tasks. - sbt: sources sbt compiles from a project's base dir (`sourcesInBase`), taken from `unmanagedSources` and emitted as files, since sbt includes them non-recursively and the base dir as a root would pull in nested subprojects.
Oskar Haarklou Veileborg (BarrensZeppelin)
approved these changes
Oct 28, 2026
Jeppe Fredsgaard Blaabjerg (jfblaa)
deleted the
jfblaa/rea-1026-producer-source-roots
branch
October 28, 2026 11:34
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.
LLM Description written by Claude Code:claude-opus-5-5
Companion to coana-tech/coana-package-manager#2658 (REA-1026). With it, Coana skips a JVM project that has no source files in its
sourcesand no class files in itstargets, rather than halting. That turns producer gaps that hide real code into silent skips, so this closes the gaps we know of. It should land no later than the Coana bump that brings #2658.commonMain/jvmMain. Previously only Java source sets were emitted.androidextension, plus the output dirs of the javac and Kotlin compile tasks. Previously nothing was emitted. AGP 9's built-in Kotlin leaves the compilations' class dirs empty, so those come from the compile tasks.sourcesInBase), taken from sbt's resolvedunmanagedSourcesand emitted as individual files. sbt includes them non-recursively, and the base dir as a source root would pull nested subprojects into the parent. spar-jvm accepts file roots, so Coana needs no change.Tested:
run-compat.sh sbt(0.13.18 to 1.9.9, plus Ivy) andrun-compat.sh gradle(1.12 to 9.2.1). The sbt smoke test now asserts that a base-dir source is emitted as a file and the base dir never is.The compat matrix runs offline against stub repositories, so it has no Kotlin or Android rows.
Known cost: on Android projects the script now realizes the javac and Kotlin compile tasks to read their output dirs.
🤖 Generated with Claude Code
Note
Medium Risk
Changes how JVM manifest scripts discover sources and class outputs for reachability; Android builds may realize compile tasks, and reflective Kotlin/AGP integration could behave differently across plugin versions.
Overview
Fixes reachability gaps where Gradle and sbt Socket facts omitted real application code, so downstream analysis could skip modules that looked sourceless.
Gradle (
socket-facts.init.gradle) still walks JavasourceSets, and now also collects Kotlin JVM/Android compilation inputs and outputs (including KMP shared sets likecommonMain) via thekotlinextension, plus Android java/kotlin/resources from theandroidextension. Compiled output for AGP (including built-in Kotlin on AGP 9) is taken fromJavaCompile/KotlinCompileTooltask destination dirs when compilation class dirs are empty.sbt (
socket-facts.plugin.scala) addsbaseDirSources: files sbt compiles from the project base directory (sourcesInBase) are merged into module source lists as individual paths, avoiding emitting the base dir as a source root that would pull in nested subprojects.The sbt compat smoke test adds
Base.scalaand assertsprojectSrclists the file, not the base directory. CHANGELOG documents the user-facing fix.Reviewed by Cursor Bugbot for commit 6c3c07c. Configure here.