Provide a simple way to tag YAML value
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
[YAML tags](https://yaml.org/spec/1.2.2/#24-tags) are a way to attach additional application-specific type information to YAML values. It would be nice to be able to have Pkl produce YAML tags.
This might be done by adding a new class in `pkl:yaml`:
```pkl
class TagDirective {
tag: String(startsWith("!"))
value: Any
}
```
When `YamlRenderer` encounters this type, it would render `tag` as a YAML tag then render `value` as if the `TagDirective` was not present.
Contributor guide
Research direction
Start by reading the pkl:yaml definitions and the YamlRenderer mentioned in the issue, then review the YAML tags specification linked there. The work is done when a TagDirective can carry a tag and value and the renderer emits the tag followed by the value's normal YAML representation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100