apple / apple/pkl

Provide a first-class API for calling converters from in-language `BaseValueRenderer` subclasses

Open
#1,413 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

Currently, renderers implemented in-language must include extensive logic to emulate how built-in renderers use `converters`. With #1333 this gap would grow even further.

It would be nice provide methods that in-language renderers can call to perform the same function.

Maybe something like this
```pkl
abstract class BaseValueRenderer {
// ...

external function convertValue(value: Any): Any

// and for annotation converter support
external function convertProperty(name: String, value: Any): Pair | RenderDirective

// ...
}

Contributor guide

Open the contributing guide

Research direction

Start with BaseValueRenderer and the existing built-in renderer paths that call converters, comparing their behavior with the in-language renderer gap described here and the changes anticipated by #1333. Done means in-language subclasses have first-class methods for value conversion and annotation-property conversion without duplicating the built-in renderer logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.