Known usages/subtypes missing in pkl-doc model version 2 #349

Closed
opened 2025-12-30 01:23:44 +01:00 by adam · 3 comments
Owner

Originally created by @sin-ack on GitHub (Oct 8, 2025).

It seems #1169 introduced a typo here:

55eac2088b/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.

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
adam closed this issue 2025-12-30 01:23:44 +01:00
Author
Owner

@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:

55eac2088b/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeDataGenerator.kt (L211-L216)

@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
Author
Owner

@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:

55eac2088b/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt (L131)

@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
Author
Owner

@bioball commented on GitHub (Oct 16, 2025):

Thanks for this!

@bioball commented on GitHub (Oct 16, 2025): Thanks for this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#349