Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump Gradle to 8.3 and Kotlin to 1.9.10 #493

Merged
merged 4 commits into from
Oct 3, 2023
Merged

chore: Bump Gradle to 8.3 and Kotlin to 1.9.10 #493

merged 4 commits into from
Oct 3, 2023

Conversation

chenrui333
Copy link
Contributor

@chenrui333 chenrui333 commented Sep 12, 2023

@chenrui333
Copy link
Contributor Author

relates to #492 (it builds fine with gradle 8.1)

@fwcd fwcd added the gradle Related to the language server's support for Gradle projects label Oct 2, 2023
@fwcd
Copy link
Owner

fwcd commented Oct 3, 2023

The language server builds with Kotlin 1.9.10, but for some reason JDK standard library classes cannot be resolved, which is why some of the tests currently fail:

image

Updating to Gradle 8.3 without upgrading Kotlin on the other hand results in

> Task :server:compileKotlin FAILED
e: file:///Users/<user>/git/kotlin-language-server/server/src/main/kotlin/org/javacs/kt/Configuration.kt:53:28 Unresolved reference: fromJson
e: file:///Users/<user>/git/kotlin-language-server/server/src/main/kotlin/org/javacs/kt/Configuration.kt:69:5 'deserialize' overrides nothing
e: file:///Users/<user>/git/kotlin-language-server/server/src/main/kotlin/org/javacs/kt/KotlinWorkspaceService.kt:40:36 Unresolved reference: fromJson
e: file:///Users/<user>/git/kotlin-language-server/server/src/main/kotlin/org/javacs/kt/KotlinWorkspaceService.kt:41:34 Unresolved reference: fromJson
e: file:///Users/<user>/git/kotlin-language-server/server/src/main/kotlin/org/javacs/kt/KotlinWorkspaceService.kt:85:19 Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public operator fun MatchGroupCollection.get(name: String): MatchGroup? defined in kotlin.text

Edit: Interestingly, the JDK class regression seems to have been introduced with Gradle 8.2, not Kotlin, the language server builds under Gradle 8.2 + Kotlin 1.8, but the tests fail in the same way as with 8.3 + 1.9.10...

Edit 2: Apparently Gradle 8.2 forces the build to use Kotlin 1.8.20 despite us pinning the Kotlin version to 1.8.10 (presumably because Gradle's internal Kotlin DSL now uses 1.8.20?). So it may very well be a Kotlin 1.8.20 regression.

Edit 3: Presumably we have to set JVMConfigurationKeys.JDK_HOME now:

@fwcd fwcd changed the title chore: bump gradle to 8.3 chore: Bump Gradle to 8.3 and Kotlin to 1.9.10 Oct 3, 2023
chenrui333 and others added 4 commits October 3, 2023 16:01
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Rui Chen <rui@chenrui.dev>
This fixes the issue that `java.*` classes could not be resolved under
Kotlin 1.8.20+.
@fwcd fwcd merged commit aaf5e88 into fwcd:main Oct 3, 2023
7 checks passed
@fwcd
Copy link
Owner

fwcd commented Oct 3, 2023

Thanks!

@fwcd fwcd added build Related to the language server's own build (including Gradle updates etc.) and removed gradle Related to the language server's support for Gradle projects labels Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to the language server's own build (including Gradle updates etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.3.5 release build failure
2 participants