[PR #509] [MERGED] Improve configuration of native image compilation #589

Closed
opened 2025-12-30 01:25:31 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/509
Author: @bioball
Created: 5/29/2024
Status: Merged
Merged: 6/4/2024
Merged by: @bioball

Base: mainHead: graalvm-23


📝 Commits (5)

  • 078d2d1 Improve configuration of native image compilation
  • 362a92f Eliminate duplicate task configuration code
  • 1f70729 Also run ServerTest against native executable
  • f72a7a6 Add pkl-server:testNative to build native job
  • 085ab4e Address PR comments

📊 Changes

11 files changed (+231 additions, -169 deletions)

View changed files

📝 .circleci/config.yml (+12 -12)
📝 .circleci/jobs/BuildNativeJob.pkl (+1 -1)
📝 pkl-cli/pkl-cli.gradle.kts (+15 -31)
pkl-commons-test/src/main/kotlin/org/pkl/commons/test/PklExecutablePaths.kt (+47 -0)
📝 pkl-core/pkl-core.gradle.kts (+29 -79)
📝 pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt (+7 -6)
📝 pkl-server/pkl-server.gradle.kts (+21 -2)
📝 pkl-server/src/test/kotlin/org/pkl/server/AbstractServerTest.kt (+7 -36)
pkl-server/src/test/kotlin/org/pkl/server/JvmServerTest.kt (+51 -0)
pkl-server/src/test/kotlin/org/pkl/server/NativeServerTest.kt (+39 -0)
📝 pkl-server/src/test/kotlin/org/pkl/server/TestTransport.kt (+2 -2)

📄 Description

This is supercedes and closes #455

Thanks to @translatenix for doing 99% of the work here

  • Remove unnecessary --add-opens by deferring initialization of MessagePack library at build time
  • Use quick build mode for 40% faster compilation and 20% smaller executable when not creating release builds
  • Add test for native executables when running in server mode

🔄 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/509 **Author:** [@bioball](https://github.com/bioball) **Created:** 5/29/2024 **Status:** ✅ Merged **Merged:** 6/4/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `graalvm-23` --- ### 📝 Commits (5) - [`078d2d1`](https://github.com/apple/pkl/commit/078d2d1f166bf695a76879f5e746bacf30af22ab) Improve configuration of native image compilation - [`362a92f`](https://github.com/apple/pkl/commit/362a92fd189bb9c6413d339281e096cb84056008) Eliminate duplicate task configuration code - [`1f70729`](https://github.com/apple/pkl/commit/1f707293ac79d19ae18136d2dc27917a7f1895e2) Also run ServerTest against native executable - [`f72a7a6`](https://github.com/apple/pkl/commit/f72a7a6e34351bff41729a06fbaf49274fd43081) Add pkl-server:testNative to build native job - [`085ab4e`](https://github.com/apple/pkl/commit/085ab4efab9e05e40d0bcb3b68e37c4e7df97cd3) Address PR comments ### 📊 Changes **11 files changed** (+231 additions, -169 deletions) <details> <summary>View changed files</summary> 📝 `.circleci/config.yml` (+12 -12) 📝 `.circleci/jobs/BuildNativeJob.pkl` (+1 -1) 📝 `pkl-cli/pkl-cli.gradle.kts` (+15 -31) ➕ `pkl-commons-test/src/main/kotlin/org/pkl/commons/test/PklExecutablePaths.kt` (+47 -0) 📝 `pkl-core/pkl-core.gradle.kts` (+29 -79) 📝 `pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt` (+7 -6) 📝 `pkl-server/pkl-server.gradle.kts` (+21 -2) 📝 `pkl-server/src/test/kotlin/org/pkl/server/AbstractServerTest.kt` (+7 -36) ➕ `pkl-server/src/test/kotlin/org/pkl/server/JvmServerTest.kt` (+51 -0) ➕ `pkl-server/src/test/kotlin/org/pkl/server/NativeServerTest.kt` (+39 -0) 📝 `pkl-server/src/test/kotlin/org/pkl/server/TestTransport.kt` (+2 -2) </details> ### 📄 Description This is supercedes and closes #455 Thanks to @translatenix for doing 99% of the work here * Remove unnecessary `--add-opens` by deferring initialization of MessagePack library at build time * Use quick build mode for 40% faster compilation and 20% smaller executable when not creating release builds * Add test for native executables when running in server mode --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:25:31 +01:00
adam closed this issue 2025-12-30 01:25:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#589