Repository navigation
kotlin: add 2.4.21 (kotlinc) - #901
Conversation
Upstream's kotlin-compiler zip from GitHub releases, installed under /usr/share/kotlin with /usr/bin symlinks for the launchers. Prebuilt because the compiler's Gradle build bootstraps from a previous Kotlin and resolves from Maven Central; same shape as maven / gradle / jdtls. Standalone tests compile a hello world with -include-runtime and run it on the plain JVM, fully offline. Refs #899. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/build |
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 15 minutes for your next included review. View limit details
Comment |
There was a problem hiding this comment.
Looks good:
- The sha256 matches and the prebuilt is called out with
binary_from. - The zip is pure JVM with fixed 1980 timestamps, and the
.batfiles are dropped. runtime_deps(bash, coreutils, jdk) match what the launchers use.- The overlapping launcher/home globs follow maven's precedent.
Two things before approving:
- Rebase needed. The branch predates #897, which moved
jdkto Temurin 25. CI tested on 21; please rebase and re-run/build. - Policy. AGENTS.md says build from source when the toolchain is packaged (jdk, maven and gradle all are). I'd like to settle once, for the whole JVM batch, whether shipping the upstream jar with
binary_fromis an accepted, documented exception. I'll approve once that's decided.
Generated by Claude Code
|
Thanks @norrietaylor.
🤖 Generated with Claude Code |
There was a problem hiding this comment.
Approving under #970. The branch is past #897 and CI re-ran on Java 25, so my earlier rebase ask is met, and the sha256 matches Kotlin's published .sha256. Please merge after #970.
Non-blocking: kotlin-compiler.jar carries jna, jansi, jline and lz4 .so resources, which #970's "bundled .so files" wording arguably excludes (raised there). Optionally, cite #969 in the comment at build.ncl:14-17.
Generated by Claude Code
What
Adds
packages/kotlin: the Kotlin compiler (kotlinc) and runner, 2.4.21 (latest stable on JetBrains/kotlin, released 2026-10-08). One of the Tier 1 items in the Java loadout checklist (#899).kotlin-compiler-2.4.21.zipfrom the GitHub release. sha2567cc140e7…e75cdmatches upstream's publishedkotlin-compiler-2.4.21.zip.sha256./usr/share/kotlin. Each launcher (kotlinc,kotlinc-jvm,kotlinc-js,kotlinc-wasm,kotlin,kotlinr,kapt) is symlinked into/usr/bin. The launchers resolveKOTLIN_HOMEby following their own symlinks, so no wrapper is needed. The.batfiles are dropped.jdk,bash(the launchers use#!/usr/bin/env bash,BASH_SOURCEand[[ =~ ]]), andcoreutils(env,uname,dirname,readlink).GithubRepoJetBrains/kotlin, for version checks.Prebuilt, not from source
The zip is pure JVM bytecode and is architecture-independent. Building the compiler from source means a Gradle build that bootstraps from an earlier Kotlin release and resolves several hundred artifacts from Maven Central and JetBrains' repositories. That cannot be done hermetically today. This is the same trade-off
maven,gradleandjdtlsmake.binary_fromrecords it.Tests
Both are Standalone and fully offline:
kotlinc_version:kotlinc -versionreportskotlinc-jvm 2.4.21.compile_and_run: compiles a smallmainthat uses the stdlib (listOf(...).sum()) with-include-runtime, then runs it with plainjava -jarand asserts the output is exactlysum=6.Verified
I built it in a
pkgbuildsession (min package build --rebuild --verbose kotlin), then ranmin check --packages kotlin. All checks pass, includingstandalone tests,missing runtime_depsandenumerate bins.Negative control: changing the expected output to
sum=7in a fresh session makesstandalone tests...Fail, so the test is not vacuous.That session was arm64 only. amd64 relies on this PR's CI
/build, though the artifact is the same JVM zip on both arches.Refs #899.
🤖 Generated with Claude Code