github-workflows-kt icon indicating copy to clipboard operation
github-workflows-kt copied to clipboard

Prepare for Kotlin 2.0

Open krzema12 opened this issue 7 months ago • 4 comments

Try the EAP release and see if there are any issues.

  • [x] install Kotlin 2.0 locally and try to use it via the shebang to regenerate workflows in this library
  • [x] configure Kotlin 2.0 via Gradle and see if the build succeed (https://kotlinlang.org/docs/configure-build-for-eap.html)

krzema12 avatar Nov 17 '23 19:11 krzema12

Downloaded https://github.com/JetBrains/kotlin/releases/download/v2.0.0-Beta1/kotlin-compiler-2.0.0-Beta1.zip and tested this way:

% ~/Downloads/kotlinc/bin/kotlin .github/workflows/build.main.kts
.github/workflows/build.main.kts:2:1: warning: file 'io.github.typesafegithub:github-workflows-kt:1.5.0' not found
.github/workflows/_shared.main.kts:2:1: warning: file 'io.github.typesafegithub:github-workflows-kt:1.5.0' not found
.github/workflows/setup-java.main.kts:2:1: warning: file 'io.github.typesafegithub:github-workflows-kt:1.5.0' not found
.github/workflows/setup-python.main.kts:2:1: warning: file 'io.github.typesafegithub:github-workflows-kt:1.5.0' not found

Despite this warning, the script worked fine.

Reported as https://youtrack.jetbrains.com/issue/KT-63584/.

krzema12 avatar Nov 19 '23 18:11 krzema12

Testing in Gradle at https://github.com/typesafegithub/github-workflows-kt/tree/kotlin-2.0

One test fails probably because the lib for testing compilation needs to be compatible with Kotlin 2.0.

krzema12 avatar Nov 19 '23 19:11 krzema12

Leaving this open until the library is released with 2.0.

krzema12 avatar Nov 19 '23 19:11 krzema12