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

feat: update to kotlin 1.9.21 #127

Merged
merged 11 commits into from
Mar 31, 2024
Merged

feat: update to kotlin 1.9.21 #127

merged 11 commits into from
Mar 31, 2024

Conversation

DarkAtra
Copy link
Member

@DarkAtra DarkAtra commented Dec 18, 2023

Now requires at least Java 21 -> new major release

This PR tries to update to the latest kotlin version as described here: oracle/graal#6957 (comment)

@DarkAtra DarkAtra requested a review from a team as a code owner December 18, 2023 15:18
@DarkAtra DarkAtra force-pushed the feat/kotlin-1.9.x-and-java-21 branch from ed589c5 to 9d2a398 Compare December 18, 2023 15:22
@DarkAtra
Copy link
Member Author

Tests are still failing in native-image. I'll have to double check that the paketo builder is using the correct graalvm version during builds.

@DarkAtra
Copy link
Member Author

DarkAtra commented Dec 27, 2023

Tests are now passing but the project currently requires at least java 21 to run. This is likely not a huge issue but would force us to release this as a new major version although the change is only necessary for GraalVM (see oracle/graal#6957 (comment)). I'll investigate the following solutions:

  • use GraalVM 21 to produce java 17 bytecode - preferred
  • only use GraalVM 21 when building the native image and use JDK 17 for JVM builds

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@DarkAtra
Copy link
Member Author

DarkAtra commented Dec 27, 2023

Building the native image locally using ./mvnw clean spring-boot:build-image -Pnative currently fails. Tests are passing though... This might be related to building on Arm64. I'll attempt to create a pre-release on Github later. If this still fails, it probably has something to do with passing --strict-image-heap to GraalVM.

@DarkAtra
Copy link
Member Author

Building the native image locally using ./mvnw clean spring-boot:build-image -Pnative currently fails. Tests are passing though... This might be related to building on Arm64. I'll attempt to create a pre-release on Github later. If this still fails, it probably has something to do with passing --strict-image-heap to GraalVM.

The build failed because i removed the native-maven-plugin a few commits ago. Re-adding it, explicitly managing the GraalVM version via BP_JVM_VERSION and dropping the --strict-image-heap argument fixed the issue.

One quirk remains: the actual (native) build environment differs from the (native) test environment. Tests require --strict-image-heap and are using OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) (as of right now). The docker build uses Java version: 21.0.2+14-LTS, vendor version: Liberica-NIK-23.1.2-1 without --strict-image-heap. This could lead to us publishing a broken native image if something is wrong with the build environment but tests are passing. This is already the case on main though, so i'll ignore this issue for now.

@DarkAtra DarkAtra force-pushed the feat/kotlin-1.9.x-and-java-21 branch from af1212c to 1be600f Compare March 31, 2024 01:02
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@DarkAtra DarkAtra changed the title feat: update to kotlin 1.9.21 and java 21 feat: update to kotlin 1.9.21 Mar 31, 2024
@DarkAtra DarkAtra merged commit c72580e into next Mar 31, 2024
7 checks passed
@DarkAtra DarkAtra deleted the feat/kotlin-1.9.x-and-java-21 branch March 31, 2024 01:07
github-actions bot pushed a commit that referenced this pull request Mar 31, 2024
## [1.0.12-next.1](v1.0.11...v1.0.12-next.1) (2024-03-31)

### Bug Fixes

* update to kotlin 1.9.21 ([#127](#127)) ([c72580e](c72580e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant