Kotlin 1.6 dependencies in Gradle lock files are expected because kotlinc, which is also used by some tests, internally uses some 1.6 dependencies for backwards compatibility reasons.
update kotlinx-html and kotlinx-serialization
adapt Kotlin code where necessary
use Kotlin stdlib Path APIs where possible
fix IntelliJ Kotlin inspection warnings
reformat code with ./gradlew spotlessApply
ktfmt adds lots of trailing commas
@KushalP If you'd like to take over from here, please go ahead. Status:
Authored in early November, rebased today
./gradlew build buildNative passes for me
I'm not aware of any mandatory work left (could try to fix more inspection warnings)
IntelliJ shows "unresolved reference" error for import org.pkl.commons.readString in class AbstractTest
looks bogus, couldn't find a way to fix (update: found a workaround, see second commit)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/900
**Author:** [@odenix](https://github.com/odenix)
**Created:** 1/23/2025
**Status:** ✅ Merged
**Merged:** 1/23/2025
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `kotlin2`
---
### 📝 Commits (2)
- [`c969d5c`](https://github.com/apple/pkl/commit/c969d5c56390c110a21614bd1722fe5f7798e128) Update Kotlin to 2.0
- [`dd44f5d`](https://github.com/apple/pkl/commit/dd44f5d354ff3c5e10be2420d4789fbf3103a587) Add workaround to fix IntelliJ "unresolved reference" errors
### 📊 Changes
**87 files changed** (+1042 additions, -1004 deletions)
<details>
<summary>View changed files</summary>
📝 `.idea/inspectionProfiles/Project_Default.xml` (+1 -1)
📝 `bench/gradle.lockfile` (+21 -16)
📝 `buildSrc/build.gradle.kts` (+4 -2)
📝 `buildSrc/src/main/kotlin/pklAllProjects.gradle.kts` (+4 -3)
📝 `docs/gradle.lockfile` (+22 -16)
📝 `docs/src/test/kotlin/DocSnippetTests.kt` (+1 -1)
📝 `gradle/libs.versions.toml` (+4 -7)
📝 `pkl-cli/gradle.lockfile` (+22 -16)
📝 `pkl-cli/src/main/kotlin/org/pkl/cli/CliEvaluator.kt` (+4 -4)
📝 `pkl-cli/src/main/kotlin/org/pkl/cli/CliEvaluatorOptions.kt` (+2 -2)
📝 `pkl-cli/src/main/kotlin/org/pkl/cli/CliImportAnalyzer.kt` (+3 -3)
📝 `pkl-cli/src/main/kotlin/org/pkl/cli/CliServer.kt` (+2 -2)
📝 `pkl-cli/src/main/kotlin/org/pkl/cli/repl/ReplCommands.kt` (+3 -3)
📝 `pkl-cli/src/main/kotlin/org/pkl/cli/repl/ReplCompleters.kt` (+7 -7)
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt` (+157 -155)
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliPackageDownloaderTest.kt` (+22 -22)
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/testExtensions.kt` (+2 -2)
📝 `pkl-codegen-java/gradle.lockfile` (+22 -16)
📝 `pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/CliJavaCodeGenerator.kt` (+2 -2)
📝 `pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/JavaCodeGenerator.kt` (+26 -27)
_...and 67 more files_
</details>
### 📄 Description
- update Kotlin from 1.7.10 to 2.0.21
- Kotlin 1.6 dependencies in Gradle lock files are expected because kotlinc, which is also used by some tests, internally uses some 1.6 dependencies for backwards compatibility reasons.
- update kotlinx-html and kotlinx-serialization
- adapt Kotlin code where necessary
- use Kotlin stdlib Path APIs where possible
- fix IntelliJ Kotlin inspection warnings
- reformat code with `./gradlew spotlessApply`
- ktfmt adds lots of trailing commas
@KushalP If you'd like to take over from here, please go ahead. Status:
* Authored in early November, rebased today
* `./gradlew build buildNative` passes for me
* I'm not aware of any mandatory work left (could try to fix more inspection warnings)
* IntelliJ shows "unresolved reference" error for `import org.pkl.commons.readString` in class `AbstractTest`
* looks bogus, couldn't find a way to fix (update: found a workaround, see second commit)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/900
Author: @odenix
Created: 1/23/2025
Status: ✅ Merged
Merged: 1/23/2025
Merged by: @bioball
Base:
main← Head:kotlin2📝 Commits (2)
c969d5cUpdate Kotlin to 2.0dd44f5dAdd workaround to fix IntelliJ "unresolved reference" errors📊 Changes
87 files changed (+1042 additions, -1004 deletions)
View changed files
📝
.idea/inspectionProfiles/Project_Default.xml(+1 -1)📝
bench/gradle.lockfile(+21 -16)📝
buildSrc/build.gradle.kts(+4 -2)📝
buildSrc/src/main/kotlin/pklAllProjects.gradle.kts(+4 -3)📝
docs/gradle.lockfile(+22 -16)📝
docs/src/test/kotlin/DocSnippetTests.kt(+1 -1)📝
gradle/libs.versions.toml(+4 -7)📝
pkl-cli/gradle.lockfile(+22 -16)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliEvaluator.kt(+4 -4)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliEvaluatorOptions.kt(+2 -2)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliImportAnalyzer.kt(+3 -3)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliServer.kt(+2 -2)📝
pkl-cli/src/main/kotlin/org/pkl/cli/repl/ReplCommands.kt(+3 -3)📝
pkl-cli/src/main/kotlin/org/pkl/cli/repl/ReplCompleters.kt(+7 -7)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliEvaluatorTest.kt(+157 -155)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliPackageDownloaderTest.kt(+22 -22)📝
pkl-cli/src/test/kotlin/org/pkl/cli/testExtensions.kt(+2 -2)📝
pkl-codegen-java/gradle.lockfile(+22 -16)📝
pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/CliJavaCodeGenerator.kt(+2 -2)📝
pkl-codegen-java/src/main/kotlin/org/pkl/codegen/java/JavaCodeGenerator.kt(+26 -27)...and 67 more files
📄 Description
./gradlew spotlessApply@KushalP If you'd like to take over from here, please go ahead. Status:
./gradlew build buildNativepasses for meimport org.pkl.commons.readStringin classAbstractTest🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.