mirror of
https://github.com/apple/pkl.git
synced 2026-05-21 14:27:07 +02:00
Known usages/subtypes missing in pkl-doc model version 2 #349
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 @sin-ack on GitHub (Oct 8, 2025).
It seems #1169 introduced a typo here:
https://github.com/apple/pkl/blob/55eac2088b756ce83b185aff6b5230dfe6378aeb/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt#L159
This should be using
copy, otherwise all data is dropped. This is preventingpkl-docfrom generating known subtypes/usages in class pages.@sin-ack commented on GitHub (Oct 8, 2025):
Additionally, there's
addKnownUsagesmissing here which also prevents usages from being included in the JSON file:https://github.com/apple/pkl/blob/55eac2088b756ce83b185aff6b5230dfe6378aeb/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeDataGenerator.kt#L211-L216
@sin-ack commented on GitHub (Oct 9, 2025):
One more, this is causing known usages to be added to known subtypes on subsequent runs of
pkldocon the same output directory:https://github.com/apple/pkl/blob/55eac2088b756ce83b185aff6b5230dfe6378aeb/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt#L131
@bioball commented on GitHub (Oct 16, 2025):
Thanks for this!