mirror of
https://github.com/apple/pkl.git
synced 2026-01-12 06:40:42 +01:00
Multi-file output should honor the output format flag #140
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 @netvl on GitHub (Apr 10, 2024).
Currently, evaluation of a Pkl module with multi-file output ignores the output format parameter for the
pkl evalcall (or theoutputFormatproperty in case of the Gradle plugin). For example (snippet taken from the docs):This is different from the regular single-file output mode, where
-fwould determine the default renderer in case it is not explicitly specified.It would probably make sense for the
-fargument to be honored for multi-file output as well, in the same way as for single-file output - by determining the output format in case an explicit renderer is not defined.@bioball commented on GitHub (Apr 11, 2024):
Makes sense.
This would be a breaking change, but the breakage would be:
-fpreviously didn't affect output, and now does.@StefMa commented on GitHub (Apr 11, 2024):
Is this a bug than a feature?
If I look into the CliEvaluator I see that it set the expected format:
https://github.com/apple/pkl/blob/main/pkl-cli%2Fsrc%2Fmain%2Fkotlin%2Forg%2Fpkl%2Fcli%2FCliEvaluator.kt#L199-L203
But it seems it will not be respected 🤔