Ability to programmatically rewrite Pkl using Pkl itself
Imagined usage:
output {
renderer = new PklRenderer {}
value = someValue
}
Rendered module should be importable in Pkl, and be logically equivalent to someValue.
Output would not retain programming constructs like for/when/amends chains.
Originally created by @bioball on GitHub (Feb 27, 2025).
There should be a renderer that renders Pkl output.
Use-cases:
* Eschew the need to create converter modules like https://pkl-lang.org/package-docs/pkg.pkl-lang.org/pkl-pantry/k8s.contrib/current/convert/index.html
* Ability to programmatically rewrite Pkl using Pkl itself
Imagined usage:
```pkl
output {
renderer = new PklRenderer {}
value = someValue
}
```
Rendered module should be importable in Pkl, and be logically equivalent to `someValue`.
Output would not retain programming constructs like for/when/amends chains.
I hope the PKL renderer would also allow to "compile" it (e.g. resolve and inline all imports) into a single PKL file for "offline" distribution of it.
I am aware of #994 which potentially could solve that too, but wanted to explicitly point out the use case 👍
PCF was considered as an alternative but it does not support functions and other constructs, making it "too constant"
@bsideup commented on GitHub (Jul 9, 2025):
I hope the PKL renderer would also allow to "compile" it (e.g. resolve and inline all imports) into a single PKL file for "offline" distribution of it.
I am aware of #994 which potentially could solve that too, but wanted to explicitly point out the use case 👍
PCF was considered as an alternative but it does not support functions and other constructs, making it "too constant"
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.
Originally created by @bioball on GitHub (Feb 27, 2025).
There should be a renderer that renders Pkl output.
Use-cases:
Imagined usage:
Rendered module should be importable in Pkl, and be logically equivalent to
someValue.Output would not retain programming constructs like for/when/amends chains.
@bsideup commented on GitHub (Jul 9, 2025):
I hope the PKL renderer would also allow to "compile" it (e.g. resolve and inline all imports) into a single PKL file for "offline" distribution of it.
I am aware of #994 which potentially could solve that too, but wanted to explicitly point out the use case 👍
PCF was considered as an alternative but it does not support functions and other constructs, making it "too constant"