This should be using copy, otherwise all data is dropped. This is preventing pkl-doc from generating known subtypes/usages in class pages.
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 preventing `pkl-doc` from generating known subtypes/usages in class pages.
adam
added the bug label 2025-12-30 01:23:44 +01:00
@sin-ack commented on GitHub (Oct 8, 2025):
Additionally, there's `addKnownUsages` missing 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 `pkldoc` on the same output directory:
https://github.com/apple/pkl/blob/55eac2088b756ce83b185aff6b5230dfe6378aeb/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt#L131
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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!