From b8aad859436c3c4e945ddb1c02384a11f3187f8d Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Thu, 16 Oct 2025 12:48:35 -0700 Subject: [PATCH] Fix tracking of known usages/subtypes (#1241) Fixes an issue where known subtype/usage information is not gathered. Also: change class RuntimeData to not return pairs for better composability. --- .../main/kotlin/org/pkl/doc/RuntimeData.kt | 28 +++++++++--------- .../org/pkl/doc/RuntimeDataGenerator.kt | 29 ++++++++----------- .../com.package1/1.2.3/baseModule/index.json | 9 +++++- .../1.2.3/classInheritance/MyClass1.json | 17 ++++++++++- .../1.2.3/classInheritance/MyClass2.json | 13 ++++++++- .../classMethodTypeReferences/MyClass.json | 9 +++++- .../classPropertyTypeReferences/MyClass.json | 9 +++++- .../1.2.3/classTypeConstraints/Address.json | 9 +++++- .../1.2.3/moduleMethodComments/index.json | 9 +++++- .../moduleMethodTypeReferences/MyClass.json | 9 +++++- .../UserDefinedAnnotation.json | 9 +++++- .../1.2.3/modulePropertyComments/index.json | 9 +++++- .../modulePropertyTypeReferences/MyClass.json | 9 +++++- .../1.2.3/moduleTypes1/index.json | 13 ++++++++- .../1.2.3/moduleTypes2/index.json | 9 +++++- .../com.package1/1.2.3/shared/MyClass.json | 17 ++++++++++- .../1.2.3/typealiases/Person.json | 9 +++++- .../com.package1/1.2.3/typealiases/index.json | 9 +++++- .../run-1/data/com.package2/4.5.6/index.json | 9 +++++- .../com.package1/1.2.3/baseModule/index.json | 9 +++++- .../1.2.3/classInheritance/MyClass1.json | 17 ++++++++++- .../1.2.3/classInheritance/MyClass2.json | 13 ++++++++- .../classMethodTypeReferences/MyClass.json | 9 +++++- .../classPropertyTypeReferences/MyClass.json | 9 +++++- .../1.2.3/classTypeConstraints/Address.json | 9 +++++- .../1.2.3/moduleMethodComments/index.json | 9 +++++- .../moduleMethodTypeReferences/MyClass.json | 9 +++++- .../UserDefinedAnnotation.json | 9 +++++- .../1.2.3/modulePropertyComments/index.json | 9 +++++- .../modulePropertyTypeReferences/MyClass.json | 9 +++++- .../1.2.3/moduleTypes1/index.json | 13 ++++++++- .../1.2.3/moduleTypes2/index.json | 9 +++++- .../com.package1/1.2.3/shared/MyClass.json | 17 ++++++++++- .../1.2.3/typealiases/Person.json | 9 +++++- .../com.package1/1.2.3/typealiases/index.json | 9 +++++- .../run-2/data/com.package2/4.5.6/index.json | 9 +++++- .../com.package1/1.2.3/baseModule/index.json | 9 +++++- .../1.2.3/classInheritance/MyClass1.json | 17 ++++++++++- .../1.2.3/classInheritance/MyClass2.json | 13 ++++++++- .../classMethodTypeReferences/MyClass.json | 9 +++++- .../classPropertyTypeReferences/MyClass.json | 9 +++++- .../1.2.3/classTypeConstraints/Address.json | 9 +++++- .../1.2.3/moduleMethodComments/index.json | 9 +++++- .../moduleMethodTypeReferences/MyClass.json | 9 +++++- .../UserDefinedAnnotation.json | 9 +++++- .../1.2.3/modulePropertyComments/index.json | 9 +++++- .../modulePropertyTypeReferences/MyClass.json | 9 +++++- .../1.2.3/moduleTypes1/index.json | 13 ++++++++- .../1.2.3/moduleTypes2/index.json | 9 +++++- .../com.package1/1.2.3/shared/MyClass.json | 21 +++++++++++++- .../1.2.3/typealiases/Person.json | 9 +++++- .../com.package1/1.2.3/typealiases/index.json | 9 +++++- .../4.5.6/Module3/Class Two {}.json | 9 +++++- .../output/data/com.package2/4.5.6/index.json | 9 +++++- .../kotlin/org/pkl/doc/CliDocGeneratorTest.kt | 2 ++ .../kotlin/org/pkl/doc/RuntimeDataTest.kt | 4 +-- 56 files changed, 522 insertions(+), 85 deletions(-) diff --git a/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt b/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt index 32979ee8..4e60eb35 100644 --- a/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt +++ b/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeData.kt @@ -84,8 +84,8 @@ internal data class RuntimeData( myRef: T, versions: Set?, comparator: Comparator, - ): Pair { - if (versions == null) return this to false + ): RuntimeData { + if (versions == null) return this val newEffectiveVersions = knownVersions.mapTo(mutableSetOf()) { it.text } + versions val knownVersions = newEffectiveVersions @@ -93,9 +93,9 @@ internal data class RuntimeData( .map { version -> RuntimeDataLink(text = version, href = myRef.pageUrlForVersion(version)) } .toSet() if (knownVersions == this.knownVersions) { - return this to false + return this } - return copy(knownVersions = knownVersions) to true + return copy(knownVersions = knownVersions) } fun > addKnownUsages( @@ -103,8 +103,8 @@ internal data class RuntimeData( refs: Collection?, text: (T) -> String, comparator: Comparator, - ): Pair { - if (refs == null) return this to false + ): RuntimeData { + if (refs == null) return this val newLinks = refs.mapTo(mutableSetOf()) { ref -> RuntimeDataLink(text = text(ref), href = ref.pageUrlRelativeTo(myRef)) @@ -112,27 +112,27 @@ internal data class RuntimeData( val knownUsages = (this.knownUsages + newLinks).distinctByCommparator(comparator).sortedBy { it.text }.toSet() if (knownUsages == this.knownUsages) { - return this to false + return this } - return copy(knownUsages = knownUsages) to true + return copy(knownUsages = knownUsages) } fun addKnownSubtypes( myRef: TypeRef, subtypes: Collection?, comparator: Comparator, - ): Pair { - if (subtypes == null) return this to false + ): RuntimeData { + if (subtypes == null) return this val newLinks = subtypes.mapTo(mutableSetOf()) { ref -> RuntimeDataLink(text = ref.displayName, href = ref.pageUrlRelativeTo(myRef)) } val knownSubtypes = - (this.knownUsages + newLinks).distinctByCommparator(comparator).sortedBy { it.text }.toSet() + (this.knownSubtypes + newLinks).distinctByCommparator(comparator).sortedBy { it.text }.toSet() if (knownSubtypes == this.knownSubtypes) { - return this to false + return this } - return copy(knownSubtypes = knownSubtypes) to true + return copy(knownSubtypes = knownSubtypes) } fun Collection.distinctByCommparator( @@ -156,5 +156,5 @@ internal data class RuntimeData( fun perPackage(): RuntimeData = copy(knownUsages = setOf(), knownSubtypes = setOf()) - fun perPackageVersion(): RuntimeData = RuntimeData(knownVersions = setOf()) + fun perPackageVersion(): RuntimeData = copy(knownVersions = setOf()) } diff --git a/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeDataGenerator.kt b/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeDataGenerator.kt index 46be8564..4938ca46 100644 --- a/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeDataGenerator.kt +++ b/pkl-doc/src/main/kotlin/org/pkl/doc/RuntimeDataGenerator.kt @@ -126,14 +126,10 @@ internal class RuntimeDataGenerator( // we must not have this package in our docsite. if (!runtimeDataPath.isRegularFile()) return@launch val usages = packageUsages[ref] - val (data, hasNewData) = - ref.existingPerPackageVersionRuntimeData.addKnownUsages( - ref, - usages, - PackageRef::pkg, - descendingVersionComparator, - ) - if (hasNewData) { + val existingData = ref.existingPerPackageVersionRuntimeData + val data = + existingData.addKnownUsages(ref, usages, PackageRef::pkg, descendingVersionComparator) + if (data != existingData) { data.doWriteTo(outputDir.resolve(ref.perPackageVersionRuntimeDataPath)) } } @@ -172,7 +168,7 @@ internal class RuntimeDataGenerator( private fun writePackageFile(packageData: PackageData) { val ref = packageData.ref val newVersions = packageVersions[packageData.ref.pkg]?.mapTo(mutableSetOf()) { it.version } - val (data, _) = + val data = ref.existingPerPackageRuntimeData.addKnownVersions( ref, newVersions, @@ -183,7 +179,7 @@ internal class RuntimeDataGenerator( private fun writePackageFilePerVersion(packageData: PackageData) { val ref = packageData.ref - val (data, _) = + val data = ref.existingPerPackageVersionRuntimeData.addKnownUsages( ref, packageUsages[ref], @@ -196,7 +192,7 @@ internal class RuntimeDataGenerator( private fun writeClassFile(classData: ClassData) { val ref = classData.ref val newVersions = classVersions[ref.id]?.mapTo(mutableSetOf()) { it } - val (data, _) = + val data = ref.existingPerPackageRuntimeData.addKnownVersions( ref, newVersions, @@ -208,12 +204,11 @@ internal class RuntimeDataGenerator( private fun writeClassFilePerVersion(classData: ClassData) { val ref = classData.ref val newSubtypes = subtypes[ref] - val (data, _) = - ref.existingPerPackageVersionRuntimeData.addKnownSubtypes( - ref, - newSubtypes, - descendingVersionComparator, - ) + val newUsages = typeUsages[ref] + val data = + ref.existingPerPackageVersionRuntimeData + .addKnownSubtypes(ref, newSubtypes, descendingVersionComparator) + .addKnownUsages(ref, newUsages, TypeRef::displayName, descendingVersionComparator) data.writePerPackageVersion(ref) } diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/baseModule/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/baseModule/index.json index 9e26dfee..1ef4efcf 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/baseModule/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/baseModule/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "moduleExtend", + "href": "../moduleExtend/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass1.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass1.json index 9e26dfee..cceb0d4d 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass1.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass1.json @@ -1 +1,16 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "MyClass2", + "href": "MyClass2.html" + }, + { + "text": "MyClass3", + "href": "MyClass3.html" + }, + { + "text": "MyClass4", + "href": "MyClass4.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass2.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass2.json index 9e26dfee..d8d70ea3 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass2.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classInheritance/MyClass2.json @@ -1 +1,12 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "MyClass3", + "href": "MyClass3.html" + }, + { + "text": "MyClass4", + "href": "MyClass4.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json index 9e26dfee..5e46d8b1 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "TypeReferences.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json index 9e26dfee..5e46d8b1 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "TypeReferences.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classTypeConstraints/Address.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classTypeConstraints/Address.json index 9e26dfee..404ceee9 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classTypeConstraints/Address.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/classTypeConstraints/Address.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Person1", + "href": "Person1.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodComments/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodComments/index.json index 9e26dfee..3e231c25 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodComments/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodComments/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "moduleMethodCommentInheritance", + "href": "../moduleMethodCommentInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json index 9e26dfee..9a9d8143 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "moduleMethodTypeReferences", + "href": "index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json index 9e26dfee..fb1bb04e 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "UserDefinedAnnotation1", + "href": "UserDefinedAnnotation1.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyComments/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyComments/index.json index 9e26dfee..b074e312 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyComments/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyComments/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "modulePropertyCommentInheritance", + "href": "../modulePropertyCommentInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json index 9e26dfee..39ee1a19 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "modulePropertyTypeReferences", + "href": "index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes1/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes1/index.json index 9e26dfee..33021a07 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes1/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes1/index.json @@ -1 +1,12 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Foo", + "href": "../moduleTypes2/Foo.html" + }, + { + "text": "moduleTypes2", + "href": "../moduleTypes2/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes2/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes2/index.json index 9e26dfee..c1ab8ea9 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes2/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/moduleTypes2/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Foo", + "href": "Foo.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/shared/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/shared/MyClass.json index 9e26dfee..8b2daf53 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/shared/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/shared/MyClass.json @@ -1 +1,16 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "../classMethodTypeReferences/TypeReferences.html" + }, + { + "text": "moduleMethodTypeReferences", + "href": "../moduleMethodTypeReferences/index.html" + }, + { + "text": "modulePropertyTypeReferences", + "href": "../modulePropertyTypeReferences/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/Person.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/Person.json index 9e26dfee..3a7f3a48 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/Person.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/Person.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "Person2", + "href": "../typeAliasInheritance/Person2.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/index.json index 9e26dfee..67087094 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package1/1.2.3/typealiases/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "typeAliasInheritance", + "href": "../typeAliasInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package2/4.5.6/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package2/4.5.6/index.json index 9e26dfee..43cefff2 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package2/4.5.6/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-1/data/com.package2/4.5.6/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "com.package1", + "href": "../../com.package1/1.2.3/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/baseModule/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/baseModule/index.json index 9e26dfee..1ef4efcf 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/baseModule/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/baseModule/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "moduleExtend", + "href": "../moduleExtend/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass1.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass1.json index 9e26dfee..cceb0d4d 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass1.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass1.json @@ -1 +1,16 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "MyClass2", + "href": "MyClass2.html" + }, + { + "text": "MyClass3", + "href": "MyClass3.html" + }, + { + "text": "MyClass4", + "href": "MyClass4.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass2.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass2.json index 9e26dfee..d8d70ea3 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass2.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classInheritance/MyClass2.json @@ -1 +1,12 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "MyClass3", + "href": "MyClass3.html" + }, + { + "text": "MyClass4", + "href": "MyClass4.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json index 9e26dfee..5e46d8b1 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "TypeReferences.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json index 9e26dfee..5e46d8b1 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "TypeReferences.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classTypeConstraints/Address.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classTypeConstraints/Address.json index 9e26dfee..404ceee9 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classTypeConstraints/Address.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/classTypeConstraints/Address.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Person1", + "href": "Person1.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodComments/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodComments/index.json index 9e26dfee..3e231c25 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodComments/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodComments/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "moduleMethodCommentInheritance", + "href": "../moduleMethodCommentInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json index 9e26dfee..9a9d8143 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "moduleMethodTypeReferences", + "href": "index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json index 9e26dfee..fb1bb04e 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "UserDefinedAnnotation1", + "href": "UserDefinedAnnotation1.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyComments/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyComments/index.json index 9e26dfee..b074e312 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyComments/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyComments/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "modulePropertyCommentInheritance", + "href": "../modulePropertyCommentInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json index 9e26dfee..39ee1a19 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "modulePropertyTypeReferences", + "href": "index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes1/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes1/index.json index 9e26dfee..33021a07 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes1/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes1/index.json @@ -1 +1,12 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Foo", + "href": "../moduleTypes2/Foo.html" + }, + { + "text": "moduleTypes2", + "href": "../moduleTypes2/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes2/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes2/index.json index 9e26dfee..c1ab8ea9 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes2/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/moduleTypes2/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Foo", + "href": "Foo.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/shared/MyClass.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/shared/MyClass.json index 9e26dfee..8b2daf53 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/shared/MyClass.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/shared/MyClass.json @@ -1 +1,16 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "../classMethodTypeReferences/TypeReferences.html" + }, + { + "text": "moduleMethodTypeReferences", + "href": "../moduleMethodTypeReferences/index.html" + }, + { + "text": "modulePropertyTypeReferences", + "href": "../modulePropertyTypeReferences/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/Person.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/Person.json index 9e26dfee..3a7f3a48 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/Person.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/Person.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "Person2", + "href": "../typeAliasInheritance/Person2.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/index.json index 9e26dfee..67087094 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package1/1.2.3/typealiases/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "typeAliasInheritance", + "href": "../typeAliasInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package2/4.5.6/index.json b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package2/4.5.6/index.json index 9e26dfee..43cefff2 100644 --- a/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package2/4.5.6/index.json +++ b/pkl-doc/src/test/files/DocGeneratorTest/output/run-2/data/com.package2/4.5.6/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "com.package1", + "href": "../../com.package1/1.2.3/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/baseModule/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/baseModule/index.json index 9e26dfee..1ef4efcf 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/baseModule/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/baseModule/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "moduleExtend", + "href": "../moduleExtend/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass1.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass1.json index 9e26dfee..cceb0d4d 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass1.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass1.json @@ -1 +1,16 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "MyClass2", + "href": "MyClass2.html" + }, + { + "text": "MyClass3", + "href": "MyClass3.html" + }, + { + "text": "MyClass4", + "href": "MyClass4.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass2.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass2.json index 9e26dfee..d8d70ea3 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass2.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classInheritance/MyClass2.json @@ -1 +1,12 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "MyClass3", + "href": "MyClass3.html" + }, + { + "text": "MyClass4", + "href": "MyClass4.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json index 9e26dfee..5e46d8b1 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classMethodTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "TypeReferences.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json index 9e26dfee..5e46d8b1 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classPropertyTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "TypeReferences.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classTypeConstraints/Address.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classTypeConstraints/Address.json index 9e26dfee..404ceee9 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classTypeConstraints/Address.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/classTypeConstraints/Address.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Person1", + "href": "Person1.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodComments/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodComments/index.json index 9e26dfee..3e231c25 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodComments/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodComments/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "moduleMethodCommentInheritance", + "href": "../moduleMethodCommentInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json index 9e26dfee..9a9d8143 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleMethodTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "moduleMethodTypeReferences", + "href": "index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json index 9e26dfee..fb1bb04e 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyAnnotations/UserDefinedAnnotation.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "UserDefinedAnnotation1", + "href": "UserDefinedAnnotation1.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyComments/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyComments/index.json index 9e26dfee..b074e312 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyComments/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyComments/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "modulePropertyCommentInheritance", + "href": "../modulePropertyCommentInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json index 9e26dfee..39ee1a19 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/modulePropertyTypeReferences/MyClass.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "modulePropertyTypeReferences", + "href": "index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes1/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes1/index.json index 9e26dfee..33021a07 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes1/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes1/index.json @@ -1 +1,12 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Foo", + "href": "../moduleTypes2/Foo.html" + }, + { + "text": "moduleTypes2", + "href": "../moduleTypes2/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes2/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes2/index.json index 9e26dfee..c1ab8ea9 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes2/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/moduleTypes2/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "Foo", + "href": "Foo.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/shared/MyClass.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/shared/MyClass.json index 9e26dfee..efaffe5c 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/shared/MyClass.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/shared/MyClass.json @@ -1 +1,20 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "TypeReferences", + "href": "../classMethodTypeReferences/TypeReferences.html" + }, + { + "text": "TypeReferences", + "href": "../classPropertyTypeReferences/TypeReferences.html" + }, + { + "text": "moduleMethodTypeReferences", + "href": "../moduleMethodTypeReferences/index.html" + }, + { + "text": "modulePropertyTypeReferences", + "href": "../modulePropertyTypeReferences/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/Person.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/Person.json index 9e26dfee..3a7f3a48 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/Person.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/Person.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "Person2", + "href": "../typeAliasInheritance/Person2.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/index.json index 9e26dfee..67087094 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package1/1.2.3/typealiases/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownSubtypes": [ + { + "text": "typeAliasInheritance", + "href": "../typeAliasInheritance/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/Module3/Class Two {}.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/Module3/Class Two {}.json index 9e26dfee..b872e803 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/Module3/Class Two {}.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/Module3/Class Two {}.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "ternalPackage", + "href": "../../../com.package1/1.2.3/ternalPackage/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/index.json b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/index.json index 9e26dfee..43cefff2 100644 --- a/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/index.json +++ b/pkl-doc/src/test/files/DocMigratorTest/output/data/com.package2/4.5.6/index.json @@ -1 +1,8 @@ -{} \ No newline at end of file +{ + "knownUsages": [ + { + "text": "com.package1", + "href": "../../com.package1/1.2.3/index.html" + } + ] +} \ No newline at end of file diff --git a/pkl-doc/src/test/kotlin/org/pkl/doc/CliDocGeneratorTest.kt b/pkl-doc/src/test/kotlin/org/pkl/doc/CliDocGeneratorTest.kt index 6510ed72..e40604ba 100644 --- a/pkl-doc/src/test/kotlin/org/pkl/doc/CliDocGeneratorTest.kt +++ b/pkl-doc/src/test/kotlin/org/pkl/doc/CliDocGeneratorTest.kt @@ -147,6 +147,8 @@ class CliDocGeneratorTest { assertThat(e).hasMessageContaining("at least one", "module") } + // to re-generate output, delete directory pkl-doc/src/test/files/DocGeneratorTest/output and run + // again @ParameterizedTest @MethodSource("generateDocs") fun test(relativeFilePath: String) { diff --git a/pkl-doc/src/test/kotlin/org/pkl/doc/RuntimeDataTest.kt b/pkl-doc/src/test/kotlin/org/pkl/doc/RuntimeDataTest.kt index 36bc43eb..55ea4973 100644 --- a/pkl-doc/src/test/kotlin/org/pkl/doc/RuntimeDataTest.kt +++ b/pkl-doc/src/test/kotlin/org/pkl/doc/RuntimeDataTest.kt @@ -41,7 +41,7 @@ class RuntimeDataTest { ModuleRef(pkg = "foo", pkgUri = null, version = "1.3.0", module = "foo"), ) val result = current.addKnownUsages(ref, usages, { it.fullName }, descendingVersionComparator) - assertThat(result.first) + assertThat(result) .isEqualTo( RuntimeData( knownUsages = setOf(RuntimeDataLink("foo.foo", "../../../foo/1.3.0/foo/index.html")) @@ -59,7 +59,7 @@ class RuntimeDataTest { val usages = setOf(ModuleRef(pkg = "foo", pkgUri = null, version = "1.2.0", module = "foo")) val result = current.addKnownUsages(ref, usages, { it.fullName }, descendingVersionComparator) - assertThat(result.first) + assertThat(result) .isEqualTo( RuntimeData( knownUsages = setOf(RuntimeDataLink("foo.foo", "../../../foo/1.3.0/foo/index.html"))