Skip to content

Conversation

Strum355
Copy link
Contributor

Closes #417

Test plan

I tested this on https://github.com/fwcd/kotlin-language-server 🙂

@Strum355 Strum355 requested a review from olafurpg March 25, 2022 17:24
@Strum355 Strum355 self-assigned this Mar 25, 2022
@Strum355 Strum355 force-pushed the nsc/kotlin-jvm-toolchains branch from 1a71469 to d93358d Compare March 25, 2022 17:29
@Strum355
Copy link
Contributor Author

I might have to change this to copy everything, as symbolic links under Windows has historically required elevated permissions. What do you think? @olafurpg

@Strum355 Strum355 changed the title symbolic link ${jdk-home}/lib to forwarding toolchain directory for Kotlin copy ${jdk-home}/lib to forwarding toolchain directory for Kotlin Mar 28, 2022
@Strum355 Strum355 force-pushed the nsc/kotlin-jvm-toolchains branch from b4179b1 to 6d3b2d2 Compare March 28, 2022 13:40
@Strum355 Strum355 changed the title copy ${jdk-home}/lib to forwarding toolchain directory for Kotlin copy JDK_HOME bootstrap files to forwarding toolchain directory for Kotlin Mar 28, 2022
@Strum355 Strum355 force-pushed the nsc/kotlin-jvm-toolchains branch from 0ca7533 to f11080f Compare March 28, 2022 22:10
Copy link
Contributor

@varungandhi-src varungandhi-src left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, probably could be compressed a bit more but thanks for simplifying away the class definition.

Strum355 and others added 2 commits March 28, 2022 23:15
…GradleJavaCompiler.scala

Co-authored-by: Varun Gandhi <varun.gandhi@sourcegraph.com>
@Strum355 Strum355 enabled auto-merge (squash) March 28, 2022 22:26
@Strum355 Strum355 merged commit 5d7ccd5 into main Mar 28, 2022
Comment on lines +123 to +134
val javaHome = javacPath.getParent.getParent
val libPath = dir.resolve("lib")
val javacLibPath = javaHome.resolve("lib")
copyFiles(javacLibPath, libPath)

if (languageVersion == "8") {
val jreLibPath = dir.resolve("jre").resolve("lib")
Files.createDirectories(jreLibPath.getParent)
val javacJreLibPath = javaHome.resolve("jre").resolve("lib")

copyFiles(javacJreLibPath, jreLibPath)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and compact! 🍬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

indexing Kotlin repository fails when Gradle Java toolchains is enabled
2 participants