This allows consumers of the native library to know which version of Pkl they're using, e.g. to build version-specific gates around newer functionality.
🔄 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/1124
**Author:** [@KushalP](https://github.com/KushalP)
**Created:** 7/14/2025
**Status:** ✅ Merged
**Merged:** 7/14/2025
**Merged by:** [@KushalP](https://github.com/KushalP)
**Base:** `c-library` ← **Head:** `c-library-version`
---
### 📝 Commits (2)
- [`a7b898b`](https://github.com/apple/pkl/commit/a7b898b3cb773a5d14288fe01e71266a64fcaf7f) Be consistent: use `userData` as parameter name, as per SPICE
- [`7b31fd0`](https://github.com/apple/pkl/commit/7b31fd03f9b7ad7de78e54bce9dae1bff6aafb2b) Expose version of Pkl within native library using `pkl_version`
### 📊 Changes
**5 files changed** (+34 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `libpkl/src/main/c/pkl.c` (+6 -2)
📝 `libpkl/src/main/c/pkl.h` (+7 -0)
📝 `libpkl/src/main/java/org/pkl/libpkl/LibPkl.java` (+11 -0)
📝 `libpkl/src/nativeTest/kotlin/org/pkl/libpkl/LibPklJNA.kt` (+2 -0)
📝 `libpkl/src/nativeTest/kotlin/org/pkl/libpkl/LibPklTest.kt` (+8 -0)
</details>
### 📄 Description
This allows consumers of the native library to know which version of Pkl they're using, e.g. to build version-specific gates around newer functionality.
---
<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/1124
Author: @KushalP
Created: 7/14/2025
Status: ✅ Merged
Merged: 7/14/2025
Merged by: @KushalP
Base:
c-library← Head:c-library-version📝 Commits (2)
a7b898bBe consistent: useuserDataas parameter name, as per SPICE7b31fd0Expose version of Pkl within native library usingpkl_version📊 Changes
5 files changed (+34 additions, -2 deletions)
View changed files
📝
libpkl/src/main/c/pkl.c(+6 -2)📝
libpkl/src/main/c/pkl.h(+7 -0)📝
libpkl/src/main/java/org/pkl/libpkl/LibPkl.java(+11 -0)📝
libpkl/src/nativeTest/kotlin/org/pkl/libpkl/LibPklJNA.kt(+2 -0)📝
libpkl/src/nativeTest/kotlin/org/pkl/libpkl/LibPklTest.kt(+8 -0)📄 Description
This allows consumers of the native library to know which version of Pkl they're using, e.g. to build version-specific gates around newer functionality.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.