Provide a Pkl renderer
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
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.
Contributor guide
Research direction
The issue names no repository files or tests; start by locating the output and renderer entry points and reviewing how existing Pkl outputs are produced. Use the linked converter-module example as context. Done means a PklRenderer can emit importable Pkl that is logically equivalent to the input value without retaining for, when, or amends constructs.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100