Hiya :wave: I noticed something conflicting in th...
# kontributors
k
Hiya 👋 I noticed something conflicting in the Kotlin documentation as well as some unexpected behavior when running Kotlin JVM Daemon via Gradle. Wanted to come here and ask what's the best way to go about contributing to the documentation of current behavior (and maybe a bugfix, we'll see) The documentation on Kotlin JVM args has a few different parts 1. Gradle daemon arguments inheritance
If nothing is specified, the Kotlin daemon inherits arguments from the Gradle daemon. For example, in the
gradle.properties
file:
Copy code
org.gradle.jvmargs=-Xmx1500m -Xms500m
2. Kotlin daemon's behavior with JVM arguments
If the
Xmx
argument is not specified, the Kotlin daemon will inherit it from the Gradle daemon.
🧵 for more details
First in VisualVM I can inspect the Gradle Daemon and I see everything I've set like Xmx, Xms, G1GC, Metaspace, CodeCache...
Screenshot 2024-09-17 at 6.08.56 PM.png
And for Kotlin Daemon Xmx and CodeCache are carried over, nothing else. This conflicts with both points in the documentation because: • The first implies all Gradle JVM args would be carried over if nothing is supplied for Kotlin JVM args • The second states only
Xmx
would be carried over, but nothing in the documentation mentions specifically pulling over
ReservedCodeCache
Screenshot 2024-09-17 at 6.09.35 PM.png
When I do specify everything in
kotlin.daemon.jvmargs
everything is carried over as expected
My first goal would be to update the Kotlin Lang docs to point out this behavior clearly. My second would be - was it intentional to carry over ReservedCodeCache? I'd like to figure out where in Gradle or KGP that reference is and the reasoning behind that decision. But I can't find the Kotlin Lang website source on GitHub so I'm not sure where to begin.