Hi everyone, I want to contribute in Kotlin and ne...
# kontributors
c
Hi everyone, I want to contribute in Kotlin and need a little bit of your help. Actually, I cloned the repo https://github.com/JetBrains/kotlin But when I opened the project in my IDE(IntelliJ) it took 1.5 hours to build then another 45 mins to run tests which I had to stop in the middle as it was too much of waiting. This is too much of time and isn't sustainable for me to keep waiting that long. For now, I only want to get my hands on JS module https://github.com/JetBrains/kotlin/tree/master/js Is there any way possible that I could clone just that and don't have to worry for the other modules which would only increase build and testing times? What do you guys do?
i
1. I don't think you can open the project in IDEA partially 2. The build of distributive (
./gradlew dist
) is more or less atomic. But you can publish only some artifacts of Kotlin to a repository (like only compiler, only Gradle plugin, etc.). But this will not significantly speed up the compilation, because Kotlin is compiled incrementally (only changed modules and their dependents are recompiled). Anyway, subsequent assemblies will be faster. 3. All Kotlin's tests should not be run locally, that's for sure. You can just run a certain test file related to your feature (please explain your changes then), or even single test methods (if you are debugging something, for example) in IntelliJ IDEA.
About publishing and building: 1.
./gradlew dist
gives you distributive of command-line compiler that is quite useful for trying your changes (in
dist
directory). 2.
./gradlew assemble
just tries to build all modules (without running tests). 3.
./gradlew publishToMavenLocal
puts all Kotlin's artifacts to your local maven repository (usually,
~/.m2
) 4.
./gradlew publish
puts them to
build/repo
directory 5.
./gradlew :kotlin-compiler-embeddable:publishToMavenLocal
updates only embeddable Kotlin Compiler's JAR 6.
./gradlew :kotlin-compiler-embeddable:assemble
only builds modules needed for embeddable Kotlin Compiler (without publishing or testing) Particular test classes or methods are easier to be run just from IDEA
c
Hi thanks for clarification. I would try this.