Compare commits

..

1 Commits

Author SHA1 Message Date
Islon Scherer 842c46e358 remove folders from build executable dir 2025-02-26 17:52:27 +01:00
48 changed files with 74 additions and 379 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
// limitations under the License. // limitations under the License.
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// File gets rendered to .circleci/config.yml via git hook. // File gets rendered to .circleci/config.yml via git hook.
amends "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.circleci@1.2.0#/PklCI.pkl" amends "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.circleci@1.1.1#/PklCI.pkl"
import "jobs/BuildNativeJob.pkl" import "jobs/BuildNativeJob.pkl"
import "jobs/GradleCheckJob.pkl" import "jobs/GradleCheckJob.pkl"
+4 -4
View File
@@ -34,7 +34,7 @@ jobs:
environment: environment:
LANG: en_US.UTF-8 LANG: en_US.UTF-8
JAVA_HOME: /Users/distiller/jdk/Contents/Home JAVA_HOME: /Users/distiller/jdk/Contents/Home
resource_class: m2pro.large resource_class: macos.m1.large.gen1
macos: macos:
xcode: 15.3.0 xcode: 15.3.0
pkl-cli-linux-amd64-release: pkl-cli-linux-amd64-release:
@@ -142,7 +142,7 @@ jobs:
environment: environment:
LANG: en_US.UTF-8 LANG: en_US.UTF-8
JAVA_HOME: /Users/distiller/jdk/Contents/Home JAVA_HOME: /Users/distiller/jdk/Contents/Home
resource_class: m2pro.large resource_class: macos.m1.large.gen1
macos: macos:
xcode: 15.3.0 xcode: 15.3.0
pkl-cli-linux-aarch64-release: pkl-cli-linux-aarch64-release:
@@ -347,7 +347,7 @@ jobs:
environment: environment:
LANG: en_US.UTF-8 LANG: en_US.UTF-8
JAVA_HOME: /Users/distiller/jdk/Contents/Home JAVA_HOME: /Users/distiller/jdk/Contents/Home
resource_class: m2pro.large resource_class: macos.m1.large.gen1
macos: macos:
xcode: 15.3.0 xcode: 15.3.0
pkl-cli-linux-amd64-snapshot: pkl-cli-linux-amd64-snapshot:
@@ -455,7 +455,7 @@ jobs:
environment: environment:
LANG: en_US.UTF-8 LANG: en_US.UTF-8
JAVA_HOME: /Users/distiller/jdk/Contents/Home JAVA_HOME: /Users/distiller/jdk/Contents/Home
resource_class: m2pro.large resource_class: macos.m1.large.gen1
macos: macos:
xcode: 15.3.0 xcode: 15.3.0
pkl-cli-linux-aarch64-snapshot: pkl-cli-linux-aarch64-snapshot:
+2 -2
View File
@@ -16,7 +16,7 @@
/// Builds the native `pkl` CLI /// Builds the native `pkl` CLI
extends "GradleJob.pkl" extends "GradleJob.pkl"
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.5.0#/Config.pkl" import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
/// The architecture to use /// The architecture to use
arch: "amd64"|"aarch64" arch: "amd64"|"aarch64"
@@ -158,7 +158,7 @@ job {
macos { macos {
xcode = "15.3.0" xcode = "15.3.0"
} }
resource_class = "m2pro.large" resource_class = "macos.m1.large.gen1"
environment { environment {
["JAVA_HOME"] = "/Users/distiller/jdk/Contents/Home" ["JAVA_HOME"] = "/Users/distiller/jdk/Contents/Home"
} }
+1 -1
View File
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
extends "GradleJob.pkl" extends "GradleJob.pkl"
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.5.0#/Config.pkl" import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
local self = this local self = this
+1 -1
View File
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
extends "GradleJob.pkl" extends "GradleJob.pkl"
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.5.0#/Config.pkl" import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
steps { steps {
new Config.RunStep { new Config.RunStep {
+1 -1
View File
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
abstract module GradleJob abstract module GradleJob
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.5.0#/Config.pkl" import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.uri@1.0.3#/URI.pkl" import "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.uri@1.0.3#/URI.pkl"
/// Whether this is a release build or not. /// Whether this is a release build or not.
+1 -1
View File
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
extends "GradleJob.pkl" extends "GradleJob.pkl"
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.5.0#/Config.pkl" import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.1.2#/Config.pkl"
name: String = command name: String = command
+6 -19
View File
@@ -42,20 +42,20 @@ val relocations =
"org.organicdesign.fp." to "org.pkl.thirdparty.paguro.", "org.organicdesign.fp." to "org.pkl.thirdparty.paguro.",
"org.snakeyaml.engine." to "org.pkl.thirdparty.snakeyaml.engine.", "org.snakeyaml.engine." to "org.pkl.thirdparty.snakeyaml.engine.",
"org.msgpack." to "org.pkl.thirdparty.msgpack.", "org.msgpack." to "org.pkl.thirdparty.msgpack.",
"org.w3c.dom." to "org.pkl.thirdparty.w3c.dom.", "org.w3c.dom." to "org.pkl.thirdparty.w3c.dom",
"com.oracle.svm.core." to "org.pkl.thirdparty.svm.", "com.oracle.svm.core." to "org.pkl.thirdparty.svm.",
// pkl-cli dependencies // pkl-cli dependencies
"org.jline." to "org.pkl.thirdparty.jline.", "org.jline." to "org.pkl.thirdparty.jline.",
"com.github.ajalt.clikt." to "org.pkl.thirdparty.clikt.", "com.github.ajalt.clikt." to "org.pkl.thirdparty.clikt.",
"com.github.ajalt.colormath." to "org.pkl.thirdparty.colormath.", "com.github.ajalt.colormath" to "org.pkl.thirdparty.colormath.",
"com.github.ajalt.mordant." to "org.pkl.thirdparty.mordant.", "com.github.ajalt.mordant" to "org.pkl.thirdparty.mordant",
"com.sun.jna." to "org.pkl.thirdparty.jna.", "com.sun.jna" to "org.pkl.thirdparty.jna",
"kotlin." to "org.pkl.thirdparty.kotlin.", "kotlin." to "org.pkl.thirdparty.kotlin.",
"kotlinx." to "org.pkl.thirdparty.kotlinx.", "kotlinx." to "org.pkl.thirdparty.kotlinx.",
"org.intellij." to "org.pkl.thirdparty.intellij.", "org.intellij." to "org.pkl.thirdparty.intellij.",
"org.fusesource.jansi." to "org.pkl.thirdparty.jansi.", "org.fusesource.jansi." to "org.pkl.thirdparty.jansi",
"org.fusesource.hawtjni." to "org.pkl.thirdparty.hawtjni.", "org.fusesource.hawtjni." to "org.pkl.thirdparty.hawtjni",
// pkl-doc dependencies // pkl-doc dependencies
"org.commonmark." to "org.pkl.thirdparty.commonmark.", "org.commonmark." to "org.pkl.thirdparty.commonmark.",
@@ -71,19 +71,6 @@ val relocations =
"com.squareup.kotlinpoet." to "org.pkl.thirdparty.kotlinpoet.", "com.squareup.kotlinpoet." to "org.pkl.thirdparty.kotlinpoet.",
) )
for ((key, value) in relocations) {
if (!key.endsWith(".")) {
throw GradleException(
"Invalid relocation `\"$key\" to \"$value\"`: `$key` should end with a dot"
)
}
if (!value.endsWith(".")) {
throw GradleException(
"Invalid relocation `\"$key\" to \"$value\"`: `$value` should end with a dot"
)
}
}
val nonRelocations = listOf("com/oracle/truffle/", "org/graalvm/") val nonRelocations = listOf("com/oracle/truffle/", "org/graalvm/")
tasks.shadowJar { tasks.shadowJar {
+1 -1
View File
@@ -1,6 +1,6 @@
name: main name: main
title: Main Project title: Main Project
version: 0.28.2 version: 0.28.0
prerelease: false prerelease: false
nav: nav:
- nav.adoc - nav.adoc
@@ -7,7 +7,7 @@
Sometimes, a change to Pkl is large enough that it makes sense to create a proposal for the change so that it can be discussed in detail and vetted. Sometimes, a change to Pkl is large enough that it makes sense to create a proposal for the change so that it can be discussed in detail and vetted.
Pkl has a process for managing such designs in a repository called {uri-pkl-evolution}[Pkl Evolution]. Pkl has a process for managing such designs in a repository called {uri-pkl-evolution}[Pkl Evolutiuon].
== Roadmap == Roadmap
@@ -17,4 +17,4 @@ The roadmap describes estimates.
The Pkl team aims to cut a release in February, June, and October of each year. The Pkl team aims to cut a release in February, June, and October of each year.
If an item is not complete by the release cutoff date, the roadmap item may be bumped to the next release. If an item is not complete by the release cutoff date, the roadmap item may be bumped to the next release.
Additionally, as priorities change, it is possible that items can be moved around or backlogged. Additionally, as priorities change, it is possible that items can be moved around, or backlogged.
@@ -3,7 +3,7 @@
// the following attributes must be updated immediately before a release // the following attributes must be updated immediately before a release
// pkl version corresponding to current git commit without -dev suffix or git hash // pkl version corresponding to current git commit without -dev suffix or git hash
:pkl-version-no-suffix: 0.28.2 :pkl-version-no-suffix: 0.28.0
// tells whether pkl version corresponding to current git commit // tells whether pkl version corresponding to current git commit
// is a release version (:is-release-version: '') or dev version (:!is-release-version:) // is a release version (:is-release-version: '') or dev version (:!is-release-version:)
:is-release-version: '' :is-release-version: ''
-24
View File
@@ -1,7 +1,6 @@
= CLI = CLI
include::ROOT:partial$component-attributes.adoc[] include::ROOT:partial$component-attributes.adoc[]
:uri-homebrew: https://brew.sh :uri-homebrew: https://brew.sh
:uri-mise: https://mise.jdx.dev
:uri-sonatype-snapshot-download: https://s01.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.pkl-lang&v={pkl-artifact-version} :uri-sonatype-snapshot-download: https://s01.oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.pkl-lang&v={pkl-artifact-version}
:uri-pkl-macos-amd64-download: {uri-sonatype-snapshot-download}&a=pkl-cli-macos-amd64&e=bin :uri-pkl-macos-amd64-download: {uri-sonatype-snapshot-download}&a=pkl-cli-macos-amd64&e=bin
@@ -85,29 +84,6 @@ ifndef::is-release-version[]
For instructions, switch to a release version of this page. For instructions, switch to a release version of this page.
endif::[] endif::[]
[[mise]]
=== Mise
On macOS, Linux, and Windows, release versions can be installed with {uri-mise}[Mise].
ifdef::is-release-version[]
To install Pkl, run:
[source,shell]
[subs="+attributes"]
----
# Install and activate Pkl globally
mise use -g pkl@{pkl-version}
# Install and activate Pkl locally
mise use pkl@{pkl-version}
----
endif::[]
ifndef::is-release-version[]
For instructions, switch to a release version of this page.
endif::[]
[[download]] [[download]]
=== Download === Download
+2 -5
View File
@@ -1,6 +1,6 @@
= Pkl 0.28 Release Notes = Pkl 0.28 Release Notes
:version: 0.28 :version: 0.28
:version-minor: 0.28.2 :version-minor: 0.28.0
:release-date: February 26th, 2025 :release-date: February 26th, 2025
include::ROOT:partial$component-attributes.adoc[] include::ROOT:partial$component-attributes.adoc[]
@@ -256,10 +256,6 @@ foo { ...bar...baz } // Syntax error
The minimum Gradle version for the xref:main:pkl-gradle:index.adoc[Gradle Plugin] has been bumped to 8.2 (https://github.com/apple/pkl/pull/901[#901]). The minimum Gradle version for the xref:main:pkl-gradle:index.adoc[Gradle Plugin] has been bumped to 8.2 (https://github.com/apple/pkl/pull/901[#901]).
=== Minimum Kotlin version bump
For users of Pkl's Kotlin libraries, the minimum Kotlin version has been bumped to 2.0 (https://github.com/apple/pkl/pull/900[#900]).
=== Java/Kotlin API breaking changes === Java/Kotlin API breaking changes
Breaking changes have been made to the Java/Kotlin APIs (https://github.com/apple/pkl/pull/748[#748], https://github.com/apple/pkl/pull/749[#749], https://github.com/apple/pkl/pull/776[#776], https://github.com/apple/pkl/pull/793[#793], https://github.com/apple/pkl/pull/808[#808], https://github.com/apple/pkl/pull/810[#810]). Breaking changes have been made to the Java/Kotlin APIs (https://github.com/apple/pkl/pull/748[#748], https://github.com/apple/pkl/pull/749[#749], https://github.com/apple/pkl/pull/776[#776], https://github.com/apple/pkl/pull/793[#793], https://github.com/apple/pkl/pull/808[#808], https://github.com/apple/pkl/pull/810[#810]).
@@ -341,6 +337,7 @@ For users that use both Pkl and other Truffle languages, this means that their v
* Documentation improvements (https://github.com/apple/pkl/pull/792[#792], https://github.com/apple/pkl/pull/846[#846], https://github.com/apple/pkl/pull/860[#860], https://github.com/apple/pkl/pull/892[#892], https://github.com/apple/pkl/pull/921[#921], https://github.com/apple/pkl/pull/937[#937], https://github.com/apple/pkl/pull/943[#943], https://github.com/apple/pkl/pull/944[#944], https://github.com/apple/pkl/pull/955[#955], https://github.com/apple/pkl/pull/956[#956], https://github.com/apple/pkl/pull/973[#973]). * Documentation improvements (https://github.com/apple/pkl/pull/792[#792], https://github.com/apple/pkl/pull/846[#846], https://github.com/apple/pkl/pull/860[#860], https://github.com/apple/pkl/pull/892[#892], https://github.com/apple/pkl/pull/921[#921], https://github.com/apple/pkl/pull/937[#937], https://github.com/apple/pkl/pull/943[#943], https://github.com/apple/pkl/pull/944[#944], https://github.com/apple/pkl/pull/955[#955], https://github.com/apple/pkl/pull/956[#956], https://github.com/apple/pkl/pull/973[#973]).
* The repository now requires Java 21 or higher to build (https://github.com/apple/pkl/pull/876[#876]). * The repository now requires Java 21 or higher to build (https://github.com/apple/pkl/pull/876[#876]).
* Enable multi-jdk testing via `-DmultiJdkTesting=true` flag when building Pkl (https://github.com/apple/pkl/pull/876[#876]). * Enable multi-jdk testing via `-DmultiJdkTesting=true` flag when building Pkl (https://github.com/apple/pkl/pull/876[#876]).
* Pkl's version of Kotlin has been upgraded to 2.0 (https://github.com/apple/pkl/pull/900[#900]).
* Allow setting commit id via `-DcommitId` flag when building Pkl (https://github.com/apple/pkl/pull/954[#954]). * Allow setting commit id via `-DcommitId` flag when building Pkl (https://github.com/apple/pkl/pull/954[#954]).
== Bugs fixed [small]#🐜# == Bugs fixed [small]#🐜#
@@ -1,43 +1,6 @@
= Changelog = Changelog
include::ROOT:partial$component-attributes.adoc[] include::ROOT:partial$component-attributes.adoc[]
[[release-0.28.2]]
== 0.28.2 (2025-04-17)
=== Fixes
* Adds an optimization when object bodies with generators produce no members (https://github.com/apple/pkl/pull/1013[#1013]).
* Fixes a runtime crash when `--output-path` points to a directory (https://github.com/apple/pkl/pull/1038[#1038]).
* Fixes a bug that sometimes causes pkl-doc to crash (https://github.com/apple/pkl/pull/1028[#1028]).
=== Miscellaneous
* Documentation improvements (https://github.com/apple/pkl/pull/982[#982], https://github.com/apple/pkl/pull/1010[#1010], https://github.com/apple/pkl/pull/1031[#1031]).
* CI improvements (https://github.com/apple/pkl/pull/1020[#1020]).
=== Contributors ❤️
Thank you to all the contributors for this release!
* https://github.com/JeroenSoeters[@JeroenSoeters]
* https://github.com/KushalP[@KushalP]
* https://github.com/mbvissers[@mbvissers]
* https://github.com/pepicrft[@pepicrft]
[[release-0.28.1]]
== 0.28.1 (2025-03-03)
=== Fixes
* Fixes an issue where Pkl Gradle tasks can possibly fail with `java.lang.UnsatisfiedLinkError` (https://github.com/apple/pkl/pull/995[#995]).
* Fixes an issue where the artifacts pkl-tools and pkl-config-java-all fail with `java.lang.ClassFormatError` (https://github.com/apple/pkl/pull/998[#998]).
=== Changes
* Adds the ability to configure `native-image` build with Gradle system properties (https://github.com/apple/pkl/pull/1001[#1001]).
+
Now, any system property starting with `"pkl.native"` will have that prefix stripped, and the rest passed as CLI arguments to `native-image`. For example, the native-image resource cache can be configured by passing Gradle flag `-Dpkl.native-Dpolyglot.engine.userResourceCache=/my/cache/dir`.
[[release-0.28.0]] [[release-0.28.0]]
== 0.28.0 (2025-02-26) == 0.28.0 (2025-02-26)
+1 -1
View File
@@ -1,7 +1,7 @@
# suppress inspection "UnusedProperty" for whole file # suppress inspection "UnusedProperty" for whole file
group=org.pkl-lang group=org.pkl-lang
version=0.28.2 version=0.28.0
# google-java-format requires jdk.compiler exports # google-java-format requires jdk.compiler exports
org.gradle.jvmargs= \ org.gradle.jvmargs= \
+3 -3
View File
@@ -2,15 +2,15 @@
"catalogs": {}, "catalogs": {},
"aliases": { "aliases": {
"pkl": { "pkl": {
"script-ref": "org.pkl-lang:pkl-cli-java:0.28.2", "script-ref": "org.pkl-lang:pkl-cli-java:0.28.0",
"java-agents": [] "java-agents": []
}, },
"pkl-codegen-java": { "pkl-codegen-java": {
"script-ref": "org.pkl-lang:pkl-codegen-java:0.28.2", "script-ref": "org.pkl-lang:pkl-codegen-java:0.28.0",
"java-agents": [] "java-agents": []
}, },
"pkl-codegen-kotlin": { "pkl-codegen-kotlin": {
"script-ref": "org.pkl-lang:pkl-codegen-kotlin:0.28.2", "script-ref": "org.pkl-lang:pkl-codegen-kotlin:0.28.0",
"java-agents": [] "java-agents": []
} }
}, },
-11
View File
@@ -237,16 +237,6 @@ fun Exec.configureExecutable(
workingDir(outputFile.map { it.asFile.parentFile }) workingDir(outputFile.map { it.asFile.parentFile })
executable = "${graalVm.baseDir}/bin/$nativeImageCommandName" executable = "${graalVm.baseDir}/bin/$nativeImageCommandName"
// For any system properties starting with `pkl.native`, strip off that prefix and pass the rest
// through as arguments to native-image.
//
// Allow setting args using flags like
// (-Dpkl.native-Dpolyglot.engine.userResourceCache=/my/cache/dir) when building through Gradle.
val extraArgsFromProperties =
System.getProperties()
.filter { it.key.toString().startsWith("pkl.native") }
.map { "${it.key}=${it.value}".substring("pkl.native".length) }
// JARs to exclude from the class path for the native-image build. // JARs to exclude from the class path for the native-image build.
val exclusions = listOf(libs.graalSdk).map { it.get().module.name } val exclusions = listOf(libs.graalSdk).map { it.get().module.name }
// https://www.graalvm.org/22.0/reference-manual/native-image/Options/ // https://www.graalvm.org/22.0/reference-manual/native-image/Options/
@@ -304,7 +294,6 @@ fun Exec.configureExecutable(
// tools. // tools.
addAll(environment.keys.filter { it.startsWith("HOMEBREW_") }.map { "-E$it" }) addAll(environment.keys.filter { it.startsWith("HOMEBREW_") }.map { "-E$it" })
addAll(extraArgs) addAll(extraArgs)
addAll(extraArgsFromProperties)
} }
} }
) )
@@ -19,7 +19,6 @@ import java.io.File
import java.io.Reader import java.io.Reader
import java.io.Writer import java.io.Writer
import java.net.URI import java.net.URI
import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.StandardOpenOption import java.nio.file.StandardOpenOption
import kotlin.io.path.createParentDirectories import kotlin.io.path.createParentDirectories
@@ -153,12 +152,6 @@ constructor(
for ((moduleUri, outputFile) in outputFiles) { for ((moduleUri, outputFile) in outputFiles) {
val moduleSource = toModuleSource(moduleUri, consoleReader) val moduleSource = toModuleSource(moduleUri, consoleReader)
val output = evaluator.evaluateExpressionString(moduleSource, options.expression) val output = evaluator.evaluateExpressionString(moduleSource, options.expression)
if (Files.isDirectory(outputFile)) {
throw CliException(
"Output file `$outputFile` is a directory. " +
"Did you mean `--multiple-file-output-path`?"
)
}
outputFile.createParentDirectories() outputFile.createParentDirectories()
if (!writtenFiles.contains(outputFile)) { if (!writtenFiles.contains(outputFile)) {
// write file even if output is empty to overwrite output from previous runs // write file even if output is empty to overwrite output from previous runs
@@ -725,39 +725,6 @@ result = someLib.x
assertThat(output).endsWith("\n") assertThat(output).endsWith("\n")
} }
@Test
fun `file output throws if output file is a directory`() {
val sourceFiles =
listOf(
writePklFile(
"test.pkl",
"""
name = "test"
output {
files {
["\(name).txt"] {
text = "test"
}
}
}
"""
.trimIndent(),
)
)
val err =
assertThrows<CliException> {
evalToFiles(
CliEvaluatorOptions(
CliBaseOptions(sourceModules = sourceFiles),
outputPath = tempDir.toString(),
)
)
}
assertThat(err)
.hasMessageContaining("Output file `$tempDir` is a directory. ")
.hasMessageContaining("Did you mean `--multiple-file-output-path`?")
}
@Test @Test
fun `multiple file output writes multiple files to the provided directory`() { fun `multiple file output writes multiple files to the provided directory`() {
val contents = val contents =
@@ -73,9 +73,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
@Specialization(guards = "checkObjectCannotHaveParameters()") @Specialization(guards = "checkObjectCannotHaveParameters()")
protected VmDynamic evalDynamic(VirtualFrame frame, VmDynamic parent) { protected VmDynamic evalDynamic(VirtualFrame frame, VmDynamic parent) {
var data = executeChildren(frame, parent, parent.getLength()); var data = executeChildren(frame, parent, parent.getLength());
if (data.hasNoMembers()) {
return parent;
}
var result = new VmDynamic(frame.materialize(), parent, data.members(), data.length()); var result = new VmDynamic(frame.materialize(), parent, data.members(), data.length());
return data.storeGeneratorFrames(result); return data.storeGeneratorFrames(result);
} }
@@ -84,9 +81,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
protected VmTyped evalTyped(VirtualFrame frame, VmTyped parent) { protected VmTyped evalTyped(VirtualFrame frame, VmTyped parent) {
VmUtils.checkIsInstantiable(parent.getVmClass(), getParentNode()); VmUtils.checkIsInstantiable(parent.getVmClass(), getParentNode());
var data = executeChildren(frame, parent, 0); var data = executeChildren(frame, parent, 0);
if (data.hasNoMembers()) {
return parent;
}
assert data.hasNoGeneratorFrames(); assert data.hasNoGeneratorFrames();
return new VmTyped(frame.materialize(), parent, parent.getVmClass(), data.members()); return new VmTyped(frame.materialize(), parent, parent.getVmClass(), data.members());
} }
@@ -94,9 +88,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
@Specialization(guards = "checkListingCannotHaveParameters()") @Specialization(guards = "checkListingCannotHaveParameters()")
protected VmListing evalListing(VirtualFrame frame, VmListing parent) { protected VmListing evalListing(VirtualFrame frame, VmListing parent) {
var data = executeChildren(frame, parent, parent.getLength()); var data = executeChildren(frame, parent, parent.getLength());
if (data.hasNoMembers()) {
return parent;
}
var result = new VmListing(frame.materialize(), parent, data.members(), data.length()); var result = new VmListing(frame.materialize(), parent, data.members(), data.length());
return data.storeGeneratorFrames(result); return data.storeGeneratorFrames(result);
} }
@@ -104,9 +95,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
@Specialization(guards = "checkMappingCannotHaveParameters()") @Specialization(guards = "checkMappingCannotHaveParameters()")
protected VmMapping evalMapping(VirtualFrame frame, VmMapping parent) { protected VmMapping evalMapping(VirtualFrame frame, VmMapping parent) {
var data = executeChildren(frame, parent, 0); var data = executeChildren(frame, parent, 0);
if (data.hasNoMembers()) {
return parent;
}
var result = new VmMapping(frame.materialize(), parent, data.members()); var result = new VmMapping(frame.materialize(), parent, data.members());
return data.storeGeneratorFrames(result); return data.storeGeneratorFrames(result);
} }
@@ -130,9 +118,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
@Specialization(guards = {"parent == getDynamicClass()", "checkObjectCannotHaveParameters()"}) @Specialization(guards = {"parent == getDynamicClass()", "checkObjectCannotHaveParameters()"})
protected VmDynamic evalDynamicClass(VirtualFrame frame, VmClass parent) { protected VmDynamic evalDynamicClass(VirtualFrame frame, VmClass parent) {
var data = executeChildren(frame, parent, 0); var data = executeChildren(frame, parent, 0);
if (data.hasNoMembers()) {
return VmDynamic.empty();
}
var result = var result =
new VmDynamic(frame.materialize(), parent.getPrototype(), data.members(), data.length()); new VmDynamic(frame.materialize(), parent.getPrototype(), data.members(), data.length());
return data.storeGeneratorFrames(result); return data.storeGeneratorFrames(result);
@@ -141,9 +126,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
@Specialization(guards = {"parent == getMappingClass()", "checkMappingCannotHaveParameters()"}) @Specialization(guards = {"parent == getMappingClass()", "checkMappingCannotHaveParameters()"})
protected VmMapping evalMappingClass(VirtualFrame frame, VmClass parent) { protected VmMapping evalMappingClass(VirtualFrame frame, VmClass parent) {
var data = executeChildren(frame, parent, 0); var data = executeChildren(frame, parent, 0);
if (data.hasNoMembers()) {
return VmMapping.empty();
}
var result = new VmMapping(frame.materialize(), parent.getPrototype(), data.members()); var result = new VmMapping(frame.materialize(), parent.getPrototype(), data.members());
return data.storeGeneratorFrames(result); return data.storeGeneratorFrames(result);
} }
@@ -151,9 +133,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
@Specialization(guards = {"parent == getListingClass()", "checkListingCannotHaveParameters()"}) @Specialization(guards = {"parent == getListingClass()", "checkListingCannotHaveParameters()"})
protected VmListing evalListingClass(VirtualFrame frame, VmClass parent) { protected VmListing evalListingClass(VirtualFrame frame, VmClass parent) {
var data = executeChildren(frame, parent, 0); var data = executeChildren(frame, parent, 0);
if (data.hasNoMembers()) {
return VmListing.empty();
}
var result = var result =
new VmListing(frame.materialize(), parent.getPrototype(), data.members(), data.length()); new VmListing(frame.materialize(), parent.getPrototype(), data.members(), data.length());
return data.storeGeneratorFrames(result); return data.storeGeneratorFrames(result);
@@ -163,9 +142,6 @@ public abstract class GeneratorObjectLiteralNode extends ObjectLiteralNode {
protected VmTyped evalTypedObjectClass(VirtualFrame frame, VmClass parent) { protected VmTyped evalTypedObjectClass(VirtualFrame frame, VmClass parent) {
VmUtils.checkIsInstantiable(parent, getParentNode()); VmUtils.checkIsInstantiable(parent, getParentNode());
var data = executeChildren(frame, parent, 0); var data = executeChildren(frame, parent, 0);
if (data.hasNoMembers()) {
return parent.getPrototype();
}
assert data.hasNoGeneratorFrames(); assert data.hasNoGeneratorFrames();
return new VmTyped(frame.materialize(), parent.getPrototype(), parent, data.members()); return new VmTyped(frame.materialize(), parent.getPrototype(), parent, data.members());
} }
@@ -55,10 +55,6 @@ public final class ObjectData {
return length; return length;
} }
boolean hasNoMembers() {
return members.isEmpty();
}
boolean hasNoGeneratorFrames() { boolean hasNoGeneratorFrames() {
return generatorFrames.isEmpty(); return generatorFrames.isEmpty();
} }
@@ -33,7 +33,7 @@ import org.pkl.core.util.Nullable;
@TruffleLanguage.Registration( @TruffleLanguage.Registration(
id = "pkl", id = "pkl",
name = "Pkl", name = "Pkl",
version = "0.28.2", version = "0.28.0",
characterMimeTypes = VmLanguage.MIME_TYPE, characterMimeTypes = VmLanguage.MIME_TYPE,
contextPolicy = ContextPolicy.SHARED) contextPolicy = ContextPolicy.SHARED)
public final class VmLanguage extends TruffleLanguage<VmContext> { public final class VmLanguage extends TruffleLanguage<VmContext> {
@@ -1,46 +0,0 @@
// should only result in one trace in the output; generator object literals that don't add any
// members should be optimized away.
res1 {
prop = trace("hello")
}
res2 = (res1) {
when (false) {
prop2 = 2
}
}
res3 = (res1) {
for (_ in List()) {
"hello"
}
}
res4 = (res1) {
...List()
}
res5 = (res1) {
when (true) {
} else {
prop3 = 3
}
}
res6 = (Dynamic) {
when (true) {}
}
res7 = (Mapping) {
when (true) {}
}
class Person {}
res8 = (Person) {
when (true) {}
}
res9 = (Listing) {
when (true) {}
}
@@ -1,20 +0,0 @@
res1 {
prop = "hello"
}
res2 {
prop = "hello"
}
res3 {
prop = "hello"
}
res4 {
prop = "hello"
}
res5 {
prop = "hello"
}
res6 {}
res7 {}
res8 {}
res9 {}
pkl: TRACE: "hello" = "hello" (file:///$snippetsDir/input/generators/generatorNoMembers.pkl)
@@ -414,9 +414,7 @@ private fun findTypesUsedBy(
enclosingPackage.name, enclosingPackage.name,
enclosingPackage.uri, enclosingPackage.uri,
enclosingPackage.version, enclosingPackage.version,
enclosingType.moduleName enclosingType.moduleName.substring(enclosingPackage.name.length + 1).replace('.', '/'),
.substring(enclosingPackage.moduleNamePrefix.length)
.replace('.', '/'),
PClassInfo.MODULE_CLASS_NAME, PClassInfo.MODULE_CLASS_NAME,
) )
) )
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -49,11 +49,6 @@ import org.pkl.core.util.Nullable;
import org.pkl.gradle.utils.PluginUtils; import org.pkl.gradle.utils.PluginUtils;
public abstract class BasePklTask extends DefaultTask { public abstract class BasePklTask extends DefaultTask {
private static final String TRUFFLE_USE_FALLBACK_RUNTIME_FLAG = "truffle.UseFallbackRuntime";
private static final String POLYGLOT_WARN_INTERPRETER_ONLY_FLAG =
"polyglot.engine.WarnInterpreterOnly";
@Input @Input
public abstract ListProperty<String> getAllowedModules(); public abstract ListProperty<String> getAllowedModules();
@@ -142,26 +137,9 @@ public abstract class BasePklTask extends DefaultTask {
@Optional @Optional
public abstract ListProperty<String> getHttpNoProxy(); public abstract ListProperty<String> getHttpNoProxy();
/**
* There are issues with using native libraries in Gradle plugins. As a workaround for now, make
* Truffle use an un-optimized runtime.
*
* @see <a
* href="https://discuss.gradle.org/t/loading-a-native-library-in-a-gradle-plugin/44854">https://discuss.gradle.org/t/loading-a-native-library-in-a-gradle-plugin/44854</a>
* @see <a
* href="https://github.com/apple/pkl/issues/988">https://github.com/apple/pkl/issues/988</a>
*/
// TODO: Remove this workaround when ugprading to Truffle 24.2+ (Truffle automatically falls back
// in this scenario).
protected void withFallbackTruffleRuntime(Runnable task) {
System.setProperty(TRUFFLE_USE_FALLBACK_RUNTIME_FLAG, "true");
System.setProperty(POLYGLOT_WARN_INTERPRETER_ONLY_FLAG, "false");
task.run();
}
@TaskAction @TaskAction
public void runTask() { public void runTask() {
withFallbackTruffleRuntime(this::doRunTask); doRunTask();
} }
protected abstract void doRunTask(); protected abstract void doRunTask();
@@ -1,5 +1,5 @@
/* /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. * Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -133,7 +133,7 @@ public abstract class ModulesTask extends BasePklTask {
if (getCliBaseOptions().getNormalizedSourceModules().isEmpty()) { if (getCliBaseOptions().getNormalizedSourceModules().isEmpty()) {
throw new InvalidUserDataException("No source modules specified."); throw new InvalidUserDataException("No source modules specified.");
} }
withFallbackTruffleRuntime(this::doRunTask); doRunTask();
} }
@Internal @Internal
-59
View File
@@ -15,8 +15,6 @@
*/ */
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import java.util.* import java.util.*
import kotlin.io.path.createDirectories
import kotlin.io.path.writeText
plugins { plugins {
pklAllProjects pklAllProjects
@@ -67,63 +65,6 @@ val javadocJar by
tasks.shadowJar { archiveBaseName.set("pkl-tools-all") } tasks.shadowJar { archiveBaseName.set("pkl-tools-all") }
private fun Exec.configureTestStartFatJar(launcher: Provider<JavaLauncher>) {
dependsOn(tasks.shadowJar)
group = "verification"
// placeholder output to satisfy up-to-date check
val outputFile = layout.buildDirectory.file("testStartFatJar/${name}.txt")
outputs.file(outputFile)
inputs.files(tasks.shadowJar)
executable = launcher.get().executablePath.asFile.absolutePath
argumentProviders.add(
CommandLineArgumentProvider {
buildList {
add("-cp")
add(tasks.shadowJar.get().outputs.files.singleFile.absolutePath)
add("org.pkl.cli.Main")
add("eval")
add("-x")
add("1 + 1")
add("pkl:base")
}
}
)
doLast {
outputFile.get().asFile.toPath().let { file ->
file.parent.createDirectories()
file.writeText("OK")
}
}
}
val testStartFatJar by
tasks.registering(Exec::class) { configureTestStartFatJar(buildInfo.javaTestLauncher) }
tasks.validateFatJar { dependsOn(testStartFatJar) }
for (jdkTarget in buildInfo.jdkTestRange) {
if (buildInfo.jdkToolchainVersion == jdkTarget) {
tasks.register("testStartFatJarJdk${jdkTarget.asInt()}") {
group = "verification"
description = "alias for testStartFatJar"
dependsOn(testStartFatJar)
}
} else {
val task =
tasks.register("testStartFatJarJdk${jdkTarget.asInt()}", Exec::class) {
val launcher = project.javaToolchains.launcherFor { languageVersion = jdkTarget }
configureTestStartFatJar(launcher)
}
if (buildInfo.multiJdkTesting) {
tasks.validateFatJar { dependsOn(task) }
}
}
}
publishing { publishing {
publications { publications {
named<MavenPublication>("fatJar") { named<MavenPublication>("fatJar") {
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@
/// ///
/// Warning: Although this module is ready for initial use, /// Warning: Although this module is ready for initial use,
/// benchmark results may be inaccurate or inconsistent. /// benchmark results may be inaccurate or inconsistent.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.Benchmark module pkl.Benchmark
import "pkl:platform" as _platform import "pkl:platform" as _platform
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@
/// @Deprecated { message = "Use `com.example.Birds.Parrot` instead" } /// @Deprecated { message = "Use `com.example.Birds.Parrot` instead" }
/// amends "pkl:PackageInfo" /// amends "pkl:PackageInfo"
/// ``` /// ```
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.DocPackageInfo module pkl.DocPackageInfo
import "pkl:reflect" import "pkl:reflect"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@
/// ///
/// title = "Title displayed in the header of each page" /// title = "Title displayed in the header of each page"
/// ``` /// ```
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.DocsiteInfo module pkl.DocsiteInfo
import "pkl:reflect" import "pkl:reflect"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// Common settings for Pkl's own evaluator. /// Common settings for Pkl's own evaluator.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
@Since { version = "0.26.0" } @Since { version = "0.26.0" }
module pkl.EvaluatorSettings module pkl.EvaluatorSettings
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@
/// value = project /// value = project
/// } /// }
/// ``` /// ```
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.Project module pkl.Project
import "pkl:EvaluatorSettings" as EvaluatorSettingsModule import "pkl:EvaluatorSettings" as EvaluatorSettingsModule
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
/// These tools differentiate from [pkl:reflect][reflect] in that they parse Pkl modules, but do not /// These tools differentiate from [pkl:reflect][reflect] in that they parse Pkl modules, but do not
/// execute any code within these modules. /// execute any code within these modules.
@Since { version = "0.27.0" } @Since { version = "0.27.0" }
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.analyze module pkl.analyze
// used by doc comments // used by doc comments
+1 -1
View File
@@ -17,7 +17,7 @@
/// Fundamental properties, methods, and classes for writing Pkl programs. /// Fundamental properties, methods, and classes for writing Pkl programs.
/// ///
/// Members of this module are automatically available in every Pkl module. /// Members of this module are automatically available in every Pkl module.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.base module pkl.base
import "pkl:jsonnet" import "pkl:jsonnet"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// A JSON parser. /// A JSON parser.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.json module pkl.json
/// A JSON parser. /// A JSON parser.
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// A [Jsonnet](https://jsonnet.org) renderer. /// A [Jsonnet](https://jsonnet.org) renderer.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.jsonnet module pkl.jsonnet
/// Constructs an [ImportStr]. /// Constructs an [ImportStr].
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
/// ///
/// Note that some mathematical functions, such as `sign()`, `abs()`, and `round()`, /// Note that some mathematical functions, such as `sign()`, `abs()`, and `round()`,
/// are directly defined in classes [Number], [Int], and [Float]. /// are directly defined in classes [Number], [Int], and [Float].
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.math module pkl.math
/// The minimum [Int] value: `-9223372036854775808`. /// The minimum [Int] value: `-9223372036854775808`.
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// Information about the platform that the current program runs on. /// Information about the platform that the current program runs on.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.platform module pkl.platform
/// The platform that the current program runs on. /// The platform that the current program runs on.
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
/// A renderer for [Protocol Buffers](https://developers.google.com/protocol-buffers). /// A renderer for [Protocol Buffers](https://developers.google.com/protocol-buffers).
/// Note: This module is _experimental_ and not ready for production use. /// Note: This module is _experimental_ and not ready for production use.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.protobuf module pkl.protobuf
import "pkl:reflect" import "pkl:reflect"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
/// - Documentation generators (such as *Pkldoc*) /// - Documentation generators (such as *Pkldoc*)
/// - Code generators (such as *pkl-codegen-java* and *pkl-codegen-kotlin*) /// - Code generators (such as *pkl-codegen-java* and *pkl-codegen-kotlin*)
/// - Domain-specific schema validators /// - Domain-specific schema validators
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.reflect module pkl.reflect
import "pkl:base" import "pkl:base"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// Information about the Pkl release that the current program runs on. /// Information about the Pkl release that the current program runs on.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.release module pkl.release
import "pkl:semver" import "pkl:semver"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// Parsing, comparison, and manipulation of [semantic version](https://semver.org/spec/v2.0.0.html) numbers. /// Parsing, comparison, and manipulation of [semantic version](https://semver.org/spec/v2.0.0.html) numbers.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.semver module pkl.semver
/// Tells whether [version] is a valid semantic version number. /// Tells whether [version] is a valid semantic version number.
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
/// Every settings file must amend this module. /// Every settings file must amend this module.
/// Unless CLI commands and build tool plugins are explicitly configured with a settings file, /// Unless CLI commands and build tool plugins are explicitly configured with a settings file,
/// they will use `~/.pkl/settings.pkl` or the defaults specified in this module. /// they will use `~/.pkl/settings.pkl` or the defaults specified in this module.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.settings module pkl.settings
import "pkl:EvaluatorSettings" import "pkl:EvaluatorSettings"
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// Utilities for generating shell scripts. /// Utilities for generating shell scripts.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.shell module pkl.shell
/// Escapes [str] by enclosing it in single quotes. /// Escapes [str] by enclosing it in single quotes.
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
/// ///
/// To write tests, amend this module and define [facts] or [examples] (or both). /// To write tests, amend this module and define [facts] or [examples] (or both).
/// To run tests, evaluate the amended module. /// To run tests, evaluate the amended module.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
open module pkl.test open module pkl.test
/// Named groups of boolean expressions that are expected to evaluate to [true]. /// Named groups of boolean expressions that are expected to evaluate to [true].
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// An XML renderer. /// An XML renderer.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.xml module pkl.xml
/// Renders values as XML. /// Renders values as XML.
+2 -2
View File
@@ -1,5 +1,5 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved. // Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
/// A YAML 1.2 compliant YAML parser. /// A YAML 1.2 compliant YAML parser.
@ModuleInfo { minPklVersion = "0.28.2" } @ModuleInfo { minPklVersion = "0.28.0" }
module pkl.yaml module pkl.yaml
/// A YAML parser. /// A YAML parser.