Summary
Windows indexing through scip-io 0.1.9 reaches scip-java 0.12.3 and Gradle successfully, then fails while compiling the generated initialization script. The actual file contains unescaped Windows paths, for example:
classpath(files("C:\Users\test\AppData\Local\Temp\scip-java123\gradle-plugin.jar"))
Gradle reports Unexpected character: '"' on that line. After fixing the path serialization, the bundled SemanticDB Kotlin plugin also needs adaptation to Kotlin 2.3.21 compiler internals.
I have prepared two backports with regressions. Related: #864 (Kotlin registrar compatibility). This does not establish a fix for the Android/AGP configuration-enumeration failure in that issue.
Reproduction and ownership
- Windows, scip-io 0.1.9, scip-java 0.12.3, Gradle 9.5.1, JDK 21.0.11.
- Moshi pinned at
889013ec2edb8d8034902662a1dc8c4f3b3f8111, using Kotlin 2.3.21; no tracked source changes.
- The parent invokes scip-io with
shell:false and a scrubbed environment preserving OS=Windows_NT. The earlier batch-launcher SHIFT-loop problem is excluded.
- scip-java's
GradleBuildTool.initScript interpolates five paths without Groovy escaping. This is upstream source serialization, not a scip-io shell-quoting failure.
Backports
- Gradle paths, based on scip-java v0.12.3 (
4486a05471000ba4e784b72395ebf84207f24af8): serialize all five paths using the existing JSON encoder, additionally escaping Groovy dollar interpolation. Add a real Groovy-parser regression for generated values and six escaping cases.
- Kotlin compatibility, based on scip-kotlin v0.5.0 (
408df420cbf877c3babc3d7c73d54299f02c038d): registrar plugin ID, FIR context/symbol/override API adaptations, preserved local/global classifications, closed source streams, valid multiline ranges, and LF documentation. Includes a compiler regression plus compatible formatter and CI configuration.
Verification
- Original generated script fails the parser regression; patched version passes all five path-value checks and six escaping cases (including backslashes, spaces, quotes and dollar signs).
- Kotlin: formatter/build pass; 58 tests pass, 23 existing skips, zero failures/errors. scip-java's source-built
cli/pack passes.
- Both Java and Kotlin generation report one successful output, zero failed languages, no partial result.
- Each mixed-language SCIP output has 57 Java + 161 Kotlin documents, 79,704 occurrences, and 14,590 reference occurrences resolving to definitions in other files. Protobuf validation checks source paths, unique documents, range bounds, definitions and references. Gradle logs have no SemanticDB plugin exceptions or compiler failure markers.
- Integration used a distinct snapshot staged in a disposable Maven repository and an explicitly selected source-built launcher. No cached release jar or installed launcher was substituted; before/after hashes match.
- Both patches pass clean-base
git apply --check --whitespace=error-all.
Scope and routing request
The combined Moshi result requires both fixes. Kotlin compatibility is verified for 2.3.21, not every compiler version. The path regression is standalone rather than wired into sbt's default test task. Hosted CI and application to current main have not been verified.
The local scip-java snapshot dependency pin and SCIP-IO CLI changes are excluded from the patches below. A consumer dependency upgrade must follow an available published plugin and keep its bundled compiler aligned.
Since sourcegraph/scip-kotlin is archived and directs work here, which maintenance branch/repository should receive these historical backports? The patch comments include their exact bases and reproduction commands; they are not presented as current-main PRs.
Patches
Patch contents follow in collapsible comments. The Gradle patch includes a lossless Base64 block and decoding command to preserve its Unicode-escape regression fixture. The Kotlin patch is split at file boundaries to fit GitHub's comment limit; concatenate its two code blocks in order. Checksums use UTF-8 with LF line endings.
Summary
Windows indexing through scip-io 0.1.9 reaches scip-java 0.12.3 and Gradle successfully, then fails while compiling the generated initialization script. The actual file contains unescaped Windows paths, for example:
classpath(files("C:\Users\test\AppData\Local\Temp\scip-java123\gradle-plugin.jar"))Gradle reports
Unexpected character: '"'on that line. After fixing the path serialization, the bundled SemanticDB Kotlin plugin also needs adaptation to Kotlin 2.3.21 compiler internals.I have prepared two backports with regressions. Related: #864 (Kotlin registrar compatibility). This does not establish a fix for the Android/AGP configuration-enumeration failure in that issue.
Reproduction and ownership
889013ec2edb8d8034902662a1dc8c4f3b3f8111, using Kotlin 2.3.21; no tracked source changes.shell:falseand a scrubbed environment preservingOS=Windows_NT. The earlier batch-launcher SHIFT-loop problem is excluded.GradleBuildTool.initScriptinterpolates five paths without Groovy escaping. This is upstream source serialization, not a scip-io shell-quoting failure.Backports
4486a05471000ba4e784b72395ebf84207f24af8): serialize all five paths using the existing JSON encoder, additionally escaping Groovy dollar interpolation. Add a real Groovy-parser regression for generated values and six escaping cases.408df420cbf877c3babc3d7c73d54299f02c038d): registrar plugin ID, FIR context/symbol/override API adaptations, preserved local/global classifications, closed source streams, valid multiline ranges, and LF documentation. Includes a compiler regression plus compatible formatter and CI configuration.Verification
cli/packpasses.git apply --check --whitespace=error-all.Scope and routing request
The combined Moshi result requires both fixes. Kotlin compatibility is verified for 2.3.21, not every compiler version. The path regression is standalone rather than wired into sbt's default test task. Hosted CI and application to current main have not been verified.
The local scip-java snapshot dependency pin and SCIP-IO CLI changes are excluded from the patches below. A consumer dependency upgrade must follow an available published plugin and keep its bundled compiler aligned.
Since sourcegraph/scip-kotlin is archived and directs work here, which maintenance branch/repository should receive these historical backports? The patch comments include their exact bases and reproduction commands; they are not presented as current-main PRs.
Patches
Patch contents follow in collapsible comments. The Gradle patch includes a lossless Base64 block and decoding command to preserve its Unicode-escape regression fixture. The Kotlin patch is split at file boundaries to fit GitHub's comment limit; concatenate its two code blocks in order. Checksums use UTF-8 with LF line endings.