mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
[PR #1169] [MERGED] Introduce pkl-doc model version 2 #925
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?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/1169
Author: @bioball
Created: 8/8/2025
Status: ✅ Merged
Merged: 9/30/2025
Merged by: @bioball
Base:
main← Head:pkldoc-improvements📝 Commits (6)
43a9ad0Introduce pkl-doc model version 2b00a035Re-generate test output2a7941bDon't use jimfs when testing DocMigratorTest061d18fFix test on Windows0bc6946Fix DocMigratorTest and other miscb09eba8Adjust labels for known subtypes/usages within package📊 Changes
1599 files changed (+129995 additions, -584 deletions)
View changed files
📝
buildSrc/src/main/kotlin/pklFatJar.gradle.kts(+3 -0)📝
gradle/libs.versions.toml(+2 -0)📝
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliException.kt(+10 -2)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/birds@0.6.0.json(+27 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/package/Bird.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/package/allFruit.pkl(+4 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/package/catalog.pkl(+4 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/package/catalog/Ostrich.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/package/catalog/Swallow.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.6.0/package/some/dir/Bird.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/birds@0.7.0.json(+27 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/package/Bird.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/package/allFruit.pkl(+4 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/package/catalog.pkl(+4 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/package/catalog/Ostrich.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/package/catalog/Swallow.pkl(+7 -0)➕
pkl-commons-test/src/main/files/packages/birds@0.7.0/package/some/dir/Bird.pkl(+7 -0)➕
pkl-commons/src/main/kotlin/org/pkl/commons/Control.kt(+33 -0)📝
pkl-doc/gradle.lockfile(+6 -1)📝
pkl-doc/pkl-doc.gradle.kts(+1 -0)...and 80 more files
📄 Description
Implementation of https://github.com/apple/pkl-evolution/pull/20
Currently, in order to update a pkl-doc documentation site, almost the entire existing site is read in order to update metadata like known versions, known subtypes, and more.
For example, adding a new version of a package requires that the existing runtime data of all existing versions be updated. Eventually, this causes the required storage size to balloon exponentially to the number of versions.
This addresses these limitations by:
Because this changes how runtime data is stored, an existing docsite needs to be migrated.
This also introduces a new migration command,
pkl-doc --migrate, which transforms an older version of the website into a newer version.NOTE: most of the additions are due to new input/output tests. I split those off into a separate commit. To review this PR, just take a look at the first commit.
The generated output changes now need to be served via an HTTP server (because of ES6 module imports).
You can review the generated site using a command like
python3 -m http.server -d pkl-doc/src/test/files/DocGeneratorTest/output/run-1/).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.