mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
opaque uris and resources interaction #352
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BenFradet on GitHub (Oct 24, 2025).
with 0.29, opaque uris are invalid: https://pkl-lang.org/main/current/release-notes/0.29.html#opaque-file-uris-are-invalid
the error message says:
However,
readrequires aResourcewhich mandates thefile:prefix.It is a bit awkward to do
Are there any alternatives?
@bioball commented on GitHub (Oct 24, 2025):
Is that resource at a relative path to your Pkl file? If so, you'd just pass in the relative path:
@HT154 commented on GitHub (Oct 24, 2025):
If you do truly want to read relative to the working directory, here's how to do it in a robust, cross-platform way:
7a8db5d291/packages/k8s.contrib.crd/generate.pkl (L98-L107)@BenFradet commented on GitHub (Oct 27, 2025):
this doesn't work, it fails with:
The prefix in Resource might me mandatory?
@HT154 commented on GitHub (Oct 27, 2025):
It is not. Reading with relative path reads relative to the module the
readis in. If you are intending to read relative to the working directory, you need to use the more verbose invocation I linked above.