mirror of
https://github.com/apple/pkl.git
synced 2026-04-23 16:58:37 +02:00
Store PklProject annotations in the project metadata (#708)
Write annotations to project metadata, and provide them to pkl-doc\ The following annotations have meaning for pkl-doc: * `@Unlisted`: hide package from documentation site * `@Deprecated`: add deprecated information
This commit is contained in:
33
pkl-commons-test/src/main/files/packages/deprecated@1.0.0/deprecated@1.0.0.json
vendored
Normal file
33
pkl-commons-test/src/main/files/packages/deprecated@1.0.0/deprecated@1.0.0.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"packageUri": "package://localhost:0/deprecated@1.0.0",
|
||||
"name": "deprecated",
|
||||
"version": "1.0.0",
|
||||
"packageZipUrl": "https://localhost:0/deprecated@1.0.0/deprecated@1.0.0.zip",
|
||||
"dependencies": {},
|
||||
"packageZipChecksums": {
|
||||
"sha256": "$computedChecksum"
|
||||
},
|
||||
"sourceCode": "https://example.com/deprecated",
|
||||
"documentation": "https://example.com/deprecated-docs",
|
||||
"license": "UNLICENSED",
|
||||
"authors": [
|
||||
"deprecated@example.com"
|
||||
],
|
||||
"issueTracker": "https://example.com/deprecated/issues",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "PObject",
|
||||
"classInfo": {
|
||||
"moduleName": "pkl.base",
|
||||
"class": "Deprecated",
|
||||
"moduleUri": "pkl:base"
|
||||
},
|
||||
"properties": {
|
||||
"since": "1.0.0",
|
||||
"message": "don't use",
|
||||
"replaceWith": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
9
pkl-commons-test/src/main/files/packages/deprecated@1.0.0/package/deprecated.pkl
vendored
Normal file
9
pkl-commons-test/src/main/files/packages/deprecated@1.0.0/package/deprecated.pkl
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/// A module from a deprecated package
|
||||
module deprecated.deprecated
|
||||
|
||||
/// Old foo
|
||||
@Deprecated { replaceWith = "bar" }
|
||||
foo: Int = 1
|
||||
|
||||
/// New bar
|
||||
bar: Int = 2
|
||||
5
pkl-commons-test/src/main/files/packages/unlisted@1.0.0/package/unlisted.pkl
vendored
Normal file
5
pkl-commons-test/src/main/files/packages/unlisted@1.0.0/package/unlisted.pkl
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/// No docs are actually generated for this module
|
||||
module unlisted.unlisted
|
||||
|
||||
/// 1
|
||||
foo: Int = 1
|
||||
29
pkl-commons-test/src/main/files/packages/unlisted@1.0.0/unlisted@1.0.0.json
vendored
Normal file
29
pkl-commons-test/src/main/files/packages/unlisted@1.0.0/unlisted@1.0.0.json
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"packageUri": "package://localhost:0/unlisted@1.0.0",
|
||||
"name": "unlisted",
|
||||
"version": "1.0.0",
|
||||
"packageZipUrl": "https://localhost:0/unlisted@1.0.0/unlisted@1.0.0.zip",
|
||||
"dependencies": {},
|
||||
"packageZipChecksums": {
|
||||
"sha256": "$computedChecksum"
|
||||
},
|
||||
"sourceCode": "https://example.com/unlisted",
|
||||
"documentation": "https://example.com/unlisted-docs",
|
||||
"license": "UNLICENSED",
|
||||
"authors": [
|
||||
"unlisted@example.com"
|
||||
],
|
||||
"issueTracker": "https://example.com/unlisted/issues",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "PObject",
|
||||
"classInfo": {
|
||||
"moduleName": "pkl.base",
|
||||
"class": "Unlisted",
|
||||
"moduleUri": "pkl:base"
|
||||
},
|
||||
"properties": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user