Skip to content

Allow overriding the pkl version inpkl_package#101

Merged
sitaktif merged 2 commits intoapple:mainfrom
sitaktif:pkl-version-override
Sep 24, 2025
Merged

Allow overriding the pkl version inpkl_package#101
sitaktif merged 2 commits intoapple:mainfrom
sitaktif:pkl-version-override

Conversation

@sitaktif
Copy link
Copy Markdown
Collaborator

Allow overriding the pkl version of a pkl_package target with a version attribute.

In order to keep that version in sync with the PklProject file, the user can use the PKL_PACKAGE_VERSION env var with e.g. version = read?("env:PKL_PACKAGE_VERSION) ?? "0.0.0-dev".

@sitaktif sitaktif force-pushed the pkl-version-override branch 2 times, most recently from 7fddbf2 to 9ed2492 Compare September 23, 2025 09:46
@sitaktif sitaktif requested a review from KushalP September 23, 2025 09:47
@sitaktif sitaktif force-pushed the pkl-version-override branch from 9ed2492 to 91ecdf7 Compare September 23, 2025 12:22
@sitaktif sitaktif force-pushed the pkl-version-override branch from 91ecdf7 to aae8d0f Compare September 24, 2025 09:10
This attribute set the 'PKL_PACKAGE_VERSION' env var during the Pkl
project package step.

rdar://160952236 ([rules_pkl] allow setting the Pkl package version
dynamically)
Move PklPackage files into separate Bazel packages, add tests to the
integration suite and add a test case for version override.
@sitaktif sitaktif force-pushed the pkl-version-override branch from aae8d0f to d3c4f86 Compare September 24, 2025 12:46
@sitaktif
Copy link
Copy Markdown
Collaborator Author

Rebased the changes, and also simplified the first two PklProject test files (they don't need to read from the environment)

@sitaktif sitaktif merged commit 554ca54 into apple:main Sep 24, 2025
3 checks passed
@sitaktif sitaktif deleted the pkl-version-override branch September 24, 2025 13:55
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.

2 participants