mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
Not possible to use output keyword even surrounded by backticks
#212
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 @dshatokhin on GitHub (Oct 8, 2024).
I'm generating a
jsonoutput for the object with key nameoutputbut even if I enclose it in backtickspklthrows an error:I'm expecting it to work as any other keywords such as
class,module,stringetc:Version used
Pkl 0.26.3onamd64Linux machine@bioball commented on GitHub (Oct 8, 2024):
The
outputproperty is a special property onModule, and can only be used to describe the module's output.To get around this, you'll need to define a class with
outputas a property, then set your module's output to a value of that class.This produces:
@dshatokhin commented on GitHub (Oct 8, 2024):
@bioball , thanks for such a quick reply, I will then use the workaround you suggested