mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a3722a471 | |||
| 2a7195125c | |||
| f0896ba16f | |||
| 9f7997bbc4 | |||
| 245b53bc8a | |||
| 9a92d75fcb | |||
| 419127fb0d | |||
| f7951510b9 | |||
| 1b49ec9422 | |||
| bdabcea216 | |||
| 5f00f9c82e |
Generated
-1
@@ -63,7 +63,6 @@
|
|||||||
</option>
|
</option>
|
||||||
<option name="IMPORT_LAYOUT_TABLE">
|
<option name="IMPORT_LAYOUT_TABLE">
|
||||||
<value>
|
<value>
|
||||||
<package name="" withSubpackages="true" static="false" module="true" />
|
|
||||||
<package name="" withSubpackages="true" static="true" />
|
<package name="" withSubpackages="true" static="true" />
|
||||||
<emptyLine />
|
<emptyLine />
|
||||||
<package name="" withSubpackages="true" static="false" />
|
<package name="" withSubpackages="true" static="false" />
|
||||||
|
|||||||
@@ -8,5 +8,4 @@ See link:CONTRIBUTING.adoc[] for general contribution guidelines.
|
|||||||
|
|
||||||
* https://github.com/bioball[Daniel Chao]
|
* https://github.com/bioball[Daniel Chao]
|
||||||
* https://github.com/stackoverflow[Islon Scherer]
|
* https://github.com/stackoverflow[Islon Scherer]
|
||||||
* https://github.com/HT154[Jen Basch]
|
|
||||||
* https://github.com/holzensp[Philip Hölzenspies]
|
* https://github.com/holzensp[Philip Hölzenspies]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ net.bytebuddy:byte-buddy:1.15.11=jmh,jmhRuntimeClasspath,testCompileClasspath,te
|
|||||||
net.sf.jopt-simple:jopt-simple:5.0.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
net.sf.jopt-simple:jopt-simple:5.0.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.apache.commons:commons-math3:3.6.1=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.apache.commons:commons-math3:3.6.1=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=jmhCompileClasspath,jmhImplementationDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=jmhCompileClasspath,jmhImplementationDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=jmh,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=jmh,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.compiler:compiler:24.1.2=graal
|
org.graalvm.compiler:compiler:24.1.2=graal
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=jmh,jmhRuntimeClasspath,truffle
|
org.graalvm.polyglot:polyglot:24.1.2=jmh,jmhRuntimeClasspath,truffle
|
||||||
org.graalvm.sdk:collections:24.1.2=graal,jmh,jmhRuntimeClasspath,truffle
|
org.graalvm.sdk:collections:24.1.2=graal,jmh,jmhRuntimeClasspath,truffle
|
||||||
@@ -35,13 +35,13 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=jmh,jmhCompileClasspath,jmhImplem
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains:annotations:13.0=jmh,jmhCompileClasspath,jmhRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=jmh,jmhCompileClasspath,jmhRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathJmh,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=jmh,jmhRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=jmh,jmhRuntimeClasspath
|
||||||
org.openjdk.jmh:jmh-core:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.openjdk.jmh:jmh-core:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
org.openjdk.jmh:jmh-generator-asm:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
org.openjdk.jmh:jmh-generator-asm:1.37=jmh,jmhCompileClasspath,jmhImplementationDependenciesMetadata,jmhRuntimeClasspath
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
name: main
|
name: main
|
||||||
title: Main Project
|
title: Main Project
|
||||||
version: 0.30.0-dev
|
version: 0.29.1
|
||||||
prerelease: true
|
prerelease: false
|
||||||
nav:
|
nav:
|
||||||
- nav.adoc
|
- nav.adoc
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=testRuntimeClasspath
|
||||||
@@ -32,13 +32,13 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=testCompileClasspath,testImplemen
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
// 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.30.0
|
:pkl-version-no-suffix: 0.29.1
|
||||||
// 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: ''
|
||||||
|
|
||||||
// the remaining attributes do not need to be updated regularly
|
// the remaining attributes do not need to be updated regularly
|
||||||
|
|
||||||
|
|||||||
@@ -733,33 +733,6 @@ pkl shell-completion bash
|
|||||||
pkl shell-completion zsh
|
pkl shell-completion zsh
|
||||||
----
|
----
|
||||||
|
|
||||||
[[command-format-check]]
|
|
||||||
=== `pkl format check`
|
|
||||||
|
|
||||||
*Synopsis*: `pkl format check <file-or-dir-path>`
|
|
||||||
|
|
||||||
This command checks for format violations on the given file or directory and print their names to stdout. +
|
|
||||||
It returns a non-zero status code in case violations are found.
|
|
||||||
|
|
||||||
If the path is a directory, recursively looks for files with a `.pkl` extension, or files named `PklProject`.
|
|
||||||
|
|
||||||
[[command-format-apply]]
|
|
||||||
=== `pkl format apply`
|
|
||||||
|
|
||||||
*Synopsis*: `pkl format apply [<options>] <file-or-dir-path>`
|
|
||||||
|
|
||||||
This command formats the given files overwriting them.
|
|
||||||
|
|
||||||
If the path is a directory, recursively looks for files with a `.pkl` extension, or files named `PklProject`.
|
|
||||||
|
|
||||||
==== Options
|
|
||||||
|
|
||||||
.-s, --silent
|
|
||||||
[%collapsible]
|
|
||||||
====
|
|
||||||
Do not write the name of wrongly formatted files to stdout.
|
|
||||||
====
|
|
||||||
|
|
||||||
[[common-options]]
|
[[common-options]]
|
||||||
=== Common options
|
=== Common options
|
||||||
|
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
= Pkl 0.30 Release Notes
|
|
||||||
:version: 0.30
|
|
||||||
:version-minor: 0.30.0
|
|
||||||
:release-date: TBD
|
|
||||||
|
|
||||||
link:ROOT:partial$component-attributes.adoc[role=include]
|
|
||||||
|
|
||||||
Pkl {version} was released on {release-date}. +
|
|
||||||
[.small]#The latest bugfix release is {version-minor}. (xref:changelog.adoc[All Versions])#
|
|
||||||
|
|
||||||
The next release (0.XX) is scheduled for ???..
|
|
||||||
To see what's coming in the future, follow the {uri-pkl-roadmap}[Pkl Roadmap].
|
|
||||||
|
|
||||||
Please send feedback and questions to https://github.com/apple/pkl/discussions[GitHub Discussions], or submit an issue on https://github.com/apple/pkl/issues/new[Github]. +
|
|
||||||
|
|
||||||
[small]#Pkl is hosted on https://github.com/apple/pkl[GitHub].
|
|
||||||
To get started, follow xref:pkl-cli:index.adoc#installation[Installation].#
|
|
||||||
|
|
||||||
== Highlights [small]#💖#
|
|
||||||
|
|
||||||
News you don't want to miss.
|
|
||||||
|
|
||||||
=== XXX
|
|
||||||
|
|
||||||
== Noteworthy [small]#🎶#
|
|
||||||
|
|
||||||
Ready when you need them.
|
|
||||||
|
|
||||||
=== XXX
|
|
||||||
|
|
||||||
== Breaking Changes [small]#💔#
|
|
||||||
|
|
||||||
Things to watch out for when upgrading.
|
|
||||||
|
|
||||||
=== XXX
|
|
||||||
|
|
||||||
== Miscellaneous [small]#🐸#
|
|
||||||
|
|
||||||
* XXX
|
|
||||||
|
|
||||||
== Bugs fixed [small]#🐜#
|
|
||||||
|
|
||||||
The following bugs have been fixed.
|
|
||||||
|
|
||||||
* XXX (https://github.com/apple/pkl/issues/XXX[XXX])
|
|
||||||
|
|
||||||
== Contributors [small]#🙏#
|
|
||||||
|
|
||||||
We would like to thank the contributors to this release (in alphabetical order):
|
|
||||||
|
|
||||||
* XXX
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
= Changelog
|
= Changelog
|
||||||
include::ROOT:partial$component-attributes.adoc[]
|
include::ROOT:partial$component-attributes.adoc[]
|
||||||
|
|
||||||
[[release-0.30.0]]
|
|
||||||
== 0.30.0 (TBD)
|
|
||||||
|
|
||||||
[[release-0.29.1]]
|
[[release-0.29.1]]
|
||||||
== 0.29.1 (2025-08-27)
|
== 0.29.1 (2025-08-27)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
The Pkl team aims to release a new version of Pkl in February, June, and October of each year.
|
The Pkl team aims to release a new version of Pkl in February, June, and October of each year.
|
||||||
|
|
||||||
* xref:0.30.adoc[0.30 Release Notes]
|
|
||||||
* xref:0.29.adoc[0.29 Release Notes]
|
* xref:0.29.adoc[0.29 Release Notes]
|
||||||
* xref:0.28.adoc[0.28 Release Notes]
|
* xref:0.28.adoc[0.28 Release Notes]
|
||||||
* xref:0.27.adoc[0.27 Release Notes]
|
* xref:0.27.adoc[0.27 Release Notes]
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
* xref:ROOT:evolution-and-roadmap.adoc[Evolution and Roadmap]
|
* xref:ROOT:evolution-and-roadmap.adoc[Evolution and Roadmap]
|
||||||
|
|
||||||
* xref:release-notes:index.adoc[Release Notes]
|
* xref:release-notes:index.adoc[Release Notes]
|
||||||
** xref:release-notes:0.30.adoc[0.30 Release Notes]
|
|
||||||
** xref:release-notes:0.29.adoc[0.29 Release Notes]
|
** xref:release-notes:0.29.adoc[0.29 Release Notes]
|
||||||
** xref:release-notes:0.28.adoc[0.28 Release Notes]
|
** xref:release-notes:0.28.adoc[0.28 Release Notes]
|
||||||
** xref:release-notes:0.27.adoc[0.27 Release Notes]
|
** xref:release-notes:0.27.adoc[0.27 Release Notes]
|
||||||
|
|||||||
+1
-1
@@ -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.30.0
|
version=0.29.1
|
||||||
|
|
||||||
# google-java-format requires jdk.compiler exports
|
# google-java-format requires jdk.compiler exports
|
||||||
org.gradle.jvmargs= \
|
org.gradle.jvmargs= \
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ org.apache.httpcomponents.client5:httpclient5:5.5=testCompileClasspath,testImple
|
|||||||
org.apache.httpcomponents.core5:httpcore5-h2:5.3.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.apache.httpcomponents.core5:httpcore5-h2:5.3.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apache.httpcomponents.core5:httpcore5:5.3.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.apache.httpcomponents.core5:httpcore5:5.3.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.eclipse.jetty.http2:http2-common:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.eclipse.jetty.http2:http2-common:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.eclipse.jetty.http2:http2-hpack:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.eclipse.jetty.http2:http2-hpack:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.eclipse.jetty.http2:http2-server:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.eclipse.jetty.http2:http2-server:11.0.24=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
@@ -110,13 +110,13 @@ org.jline:jline-reader:3.23.0=compileClasspath,implementationDependenciesMetadat
|
|||||||
org.jline:jline-terminal-jansi:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jline:jline-terminal-jansi:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jline:jline-terminal:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jline:jline-terminal:3.23.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jspecify:jspecify:1.0.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jspecify:jspecify:1.0.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ dependencies {
|
|||||||
implementation(libs.jlineTerminal)
|
implementation(libs.jlineTerminal)
|
||||||
implementation(libs.jlineTerminalJansi)
|
implementation(libs.jlineTerminalJansi)
|
||||||
implementation(projects.pklServer)
|
implementation(projects.pklServer)
|
||||||
implementation(projects.pklFormatter)
|
|
||||||
implementation(libs.clikt)
|
implementation(libs.clikt)
|
||||||
|
|
||||||
testImplementation(projects.pklCommonsTest)
|
testImplementation(projects.pklCommonsTest)
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.cli
|
|
||||||
|
|
||||||
import java.io.IOException
|
|
||||||
import java.nio.file.Files
|
|
||||||
import java.nio.file.Path
|
|
||||||
import kotlin.io.path.writeText
|
|
||||||
import org.pkl.commons.cli.CliBaseOptions
|
|
||||||
import org.pkl.commons.cli.CliException
|
|
||||||
|
|
||||||
class CliFormatterApply(cliBaseOptions: CliBaseOptions, path: Path, private val silent: Boolean) :
|
|
||||||
CliFormatterCommand(cliBaseOptions, path) {
|
|
||||||
|
|
||||||
override fun doRun() {
|
|
||||||
var status = 0
|
|
||||||
|
|
||||||
for (path in paths()) {
|
|
||||||
val contents = Files.readString(path)
|
|
||||||
val (formatted, stat) = format(path, contents)
|
|
||||||
status = if (status == 0) stat else status
|
|
||||||
if (stat != 0) continue
|
|
||||||
if (!silent && contents != formatted) {
|
|
||||||
consoleWriter.write(path.toAbsolutePath().toString())
|
|
||||||
consoleWriter.flush()
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
path.writeText(formatted, Charsets.UTF_8)
|
|
||||||
} catch (e: IOException) {
|
|
||||||
consoleWriter.write("Could not overwrite `$path`: ${e.message}")
|
|
||||||
consoleWriter.flush()
|
|
||||||
status = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (status != 0) {
|
|
||||||
throw CliException("Formatting violations found.", status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.cli
|
|
||||||
|
|
||||||
import java.nio.file.Files
|
|
||||||
import java.nio.file.Path
|
|
||||||
import org.pkl.commons.cli.CliBaseOptions
|
|
||||||
import org.pkl.commons.cli.CliException
|
|
||||||
|
|
||||||
class CliFormatterCheck(cliBaseOptions: CliBaseOptions, path: Path) :
|
|
||||||
CliFormatterCommand(cliBaseOptions, path) {
|
|
||||||
|
|
||||||
override fun doRun() {
|
|
||||||
var status = 0
|
|
||||||
|
|
||||||
for (path in paths()) {
|
|
||||||
val contents = Files.readString(path)
|
|
||||||
val (formatted, stat) = format(path, contents)
|
|
||||||
status = if (status == 0) stat else status
|
|
||||||
if (contents != formatted) {
|
|
||||||
consoleWriter.write(path.toAbsolutePath().toString())
|
|
||||||
consoleWriter.flush()
|
|
||||||
status = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (status != 0) {
|
|
||||||
throw CliException("Formatting violations found.", status)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.cli
|
|
||||||
|
|
||||||
import java.io.Writer
|
|
||||||
import java.nio.file.Path
|
|
||||||
import kotlin.io.path.ExperimentalPathApi
|
|
||||||
import kotlin.io.path.extension
|
|
||||||
import kotlin.io.path.isDirectory
|
|
||||||
import kotlin.io.path.name
|
|
||||||
import kotlin.io.path.walk
|
|
||||||
import org.pkl.commons.cli.CliBaseOptions
|
|
||||||
import org.pkl.commons.cli.CliCommand
|
|
||||||
import org.pkl.formatter.Formatter
|
|
||||||
import org.pkl.parser.GenericParserError
|
|
||||||
|
|
||||||
abstract class CliFormatterCommand
|
|
||||||
@JvmOverloads
|
|
||||||
constructor(
|
|
||||||
options: CliBaseOptions,
|
|
||||||
protected val path: Path,
|
|
||||||
protected val consoleWriter: Writer = System.out.writer(),
|
|
||||||
) : CliCommand(options) {
|
|
||||||
protected fun format(file: Path, contents: String): Pair<String, Int> {
|
|
||||||
try {
|
|
||||||
return Formatter().format(contents) to 0
|
|
||||||
} catch (pe: GenericParserError) {
|
|
||||||
consoleWriter.write("Could not format `$file`: $pe")
|
|
||||||
consoleWriter.flush()
|
|
||||||
return "" to 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@OptIn(ExperimentalPathApi::class)
|
|
||||||
protected fun paths(): Sequence<Path> {
|
|
||||||
return if (path.isDirectory()) {
|
|
||||||
path.walk().filter { it.extension == "pkl" || it.name == "PklProject" }
|
|
||||||
} else sequenceOf(path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.cli.commands
|
|
||||||
|
|
||||||
import com.github.ajalt.clikt.core.Context
|
|
||||||
import com.github.ajalt.clikt.core.NoOpCliktCommand
|
|
||||||
import com.github.ajalt.clikt.core.subcommands
|
|
||||||
import com.github.ajalt.clikt.parameters.arguments.argument
|
|
||||||
import com.github.ajalt.clikt.parameters.options.flag
|
|
||||||
import com.github.ajalt.clikt.parameters.options.option
|
|
||||||
import com.github.ajalt.clikt.parameters.types.path
|
|
||||||
import java.nio.file.Path
|
|
||||||
import org.pkl.cli.CliFormatterApply
|
|
||||||
import org.pkl.cli.CliFormatterCheck
|
|
||||||
import org.pkl.commons.cli.commands.BaseCommand
|
|
||||||
|
|
||||||
class FormatterCommand : NoOpCliktCommand(name = "format") {
|
|
||||||
override fun help(context: Context) = "Run commands related to formatting"
|
|
||||||
|
|
||||||
override fun helpEpilog(context: Context) = "For more information, visit $helpLink"
|
|
||||||
|
|
||||||
init {
|
|
||||||
subcommands(FormatterCheckCommand(), FormatterApplyCommand())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class FormatterCheckCommand : BaseCommand(name = "check", helpLink = helpLink) {
|
|
||||||
override val helpString: String =
|
|
||||||
"Check if the given files are properly formatted, printing the file name to stdout in case they are not. Returns non-zero in case of failure."
|
|
||||||
|
|
||||||
val path: Path by
|
|
||||||
argument(name = "path", help = "File or directory to check.")
|
|
||||||
.path(mustExist = true, canBeDir = true)
|
|
||||||
|
|
||||||
override fun run() {
|
|
||||||
CliFormatterCheck(baseOptions.baseOptions(emptyList()), path).run()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class FormatterApplyCommand : BaseCommand(name = "apply", helpLink = helpLink) {
|
|
||||||
override val helpString: String =
|
|
||||||
"Overwrite all the files in place with the formatted version. Returns non-zero in case of failure."
|
|
||||||
|
|
||||||
val path: Path by
|
|
||||||
argument(name = "path", help = "File or directory to format.")
|
|
||||||
.path(mustExist = true, canBeDir = true)
|
|
||||||
|
|
||||||
val silent: Boolean by
|
|
||||||
option(
|
|
||||||
names = arrayOf("-s", "--silent"),
|
|
||||||
help = "Do not write the name of the files that failed formatting to stdout.",
|
|
||||||
)
|
|
||||||
.flag()
|
|
||||||
|
|
||||||
override fun run() {
|
|
||||||
CliFormatterApply(baseOptions.baseOptions(emptyList()), path, silent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -49,7 +49,6 @@ class RootCommand : NoOpCliktCommand(name = "pkl") {
|
|||||||
ProjectCommand(),
|
ProjectCommand(),
|
||||||
DownloadPackageCommand(),
|
DownloadPackageCommand(),
|
||||||
AnalyzeCommand(),
|
AnalyzeCommand(),
|
||||||
FormatterCommand(),
|
|
||||||
CompletionCommand(
|
CompletionCommand(
|
||||||
name = "shell-completion",
|
name = "shell-completion",
|
||||||
help = "Generate a completion script for the given shell",
|
help = "Generate a completion script for the given shell",
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ internal class Repl(workingDir: Path, private val server: ReplServer) {
|
|||||||
|
|
||||||
private var continuation = false
|
private var continuation = false
|
||||||
private var quit = false
|
private var quit = false
|
||||||
private var maybeQuit = false
|
|
||||||
private var nextRequestId = 0
|
private var nextRequestId = 0
|
||||||
|
|
||||||
fun run() {
|
fun run() {
|
||||||
@@ -75,23 +74,11 @@ internal class Repl(workingDir: Path, private val server: ReplServer) {
|
|||||||
reader.readLine("pkl$nextRequestId> ")
|
reader.readLine("pkl$nextRequestId> ")
|
||||||
}
|
}
|
||||||
} catch (e: UserInterruptException) {
|
} catch (e: UserInterruptException) {
|
||||||
if (!continuation && reader.buffer.length() == 0) {
|
":quit"
|
||||||
if (maybeQuit) quit()
|
|
||||||
else {
|
|
||||||
maybeQuit = true
|
|
||||||
println("(To exit, press ^C again or ^D or type :quit)")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
maybeQuit = false
|
|
||||||
}
|
|
||||||
inputBuffer = ""
|
|
||||||
continuation = false
|
|
||||||
continue
|
|
||||||
} catch (e: EndOfFileException) {
|
} catch (e: EndOfFileException) {
|
||||||
":quit"
|
":quit"
|
||||||
}
|
}
|
||||||
|
|
||||||
maybeQuit = false
|
|
||||||
val input = line.trim()
|
val input = line.trim()
|
||||||
if (input.isEmpty()) continue
|
if (input.isEmpty()) continue
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
|||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||||
@@ -56,13 +56,13 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClass
|
|||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ io.leangen.geantyref:geantyref:1.3.16=testRuntimeClasspath
|
|||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=runtimeClasspath,testRuntimeClasspath
|
||||||
@@ -58,13 +58,13 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClass
|
|||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ com.github.ajalt.mordant:mordant:3.0.1=apiDependenciesMetadata,compileClasspath,
|
|||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
net.java.dev.jna:jna:5.14.0=runtimeClasspath,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.compiler:compiler:24.1.2=svmClasspath
|
org.graalvm.compiler:compiler:24.1.2=svmClasspath
|
||||||
org.graalvm.nativeimage:native-image-base:24.1.2=svmClasspath
|
org.graalvm.nativeimage:native-image-base:24.1.2=svmClasspath
|
||||||
org.graalvm.nativeimage:objectfile:24.1.2=svmClasspath
|
org.graalvm.nativeimage:objectfile:24.1.2=svmClasspath
|
||||||
@@ -63,13 +63,13 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClass
|
|||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathSvm,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown:0.7.3=implementationDependenciesMetadata,runtimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains:markdown:0.7.3=implementationDependenciesMetadata,runtimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,svmClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,svmClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=runtimeClasspath,svmClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=runtimeClasspath,svmClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -218,9 +218,8 @@ abstract class CliCommand(protected val cliOptions: CliBaseOptions) {
|
|||||||
}
|
}
|
||||||
if (!certsAdded) {
|
if (!certsAdded) {
|
||||||
val defaultCerts =
|
val defaultCerts =
|
||||||
this@CliCommand.javaClass.classLoader.getResourceAsStream(
|
javaClass.classLoader.getResourceAsStream("org/pkl/commons/cli/PklCARoots.pem")
|
||||||
"org/pkl/commons/cli/PklCARoots.pem"
|
?: throw CliException("Could not find bundled certificates")
|
||||||
) ?: throw CliException("Could not find bundled certificates")
|
|
||||||
addCertificates(defaultCerts.readAllBytes())
|
addCertificates(defaultCerts.readAllBytes())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
net.bytebuddy:byte-buddy:1.15.11=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-build-common:2.0.21=kotlinBuildToolsApiClasspath
|
org.jetbrains.kotlin:kotlin-build-common:2.0.21=kotlinBuildToolsApiClasspath
|
||||||
org.jetbrains.kotlin:kotlin-build-tools-api:2.0.21=kotlinBuildToolsApiClasspath
|
org.jetbrains.kotlin:kotlin-build-tools-api:2.0.21=kotlinBuildToolsApiClasspath
|
||||||
@@ -25,12 +25,12 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileCl
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
empty=annotationProcessor,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
|
empty=annotationProcessor,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains.kotlin:kotlin-build-common:2.0.21=kotlinBuildToolsApiClasspath
|
org.jetbrains.kotlin:kotlin-build-common:2.0.21=kotlinBuildToolsApiClasspath
|
||||||
org.jetbrains.kotlin:kotlin-build-tools-api:2.0.21=kotlinBuildToolsApiClasspath
|
org.jetbrains.kotlin:kotlin-build-tools-api:2.0.21=kotlinBuildToolsApiClasspath
|
||||||
@@ -25,12 +25,12 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileCl
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
empty=annotationProcessor,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
|
empty=annotationProcessor,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,signatures,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ javax.inject:javax.inject:1=testCompileClasspath,testImplementationDependenciesM
|
|||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.14.0=pklCodegenJava
|
net.java.dev.jna:jna:5.14.0=pklCodegenJava
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
@@ -57,13 +57,13 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClass
|
|||||||
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenJava,testCompileClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown-jvm:0.7.3=pklCodegenJava
|
org.jetbrains:markdown-jvm:0.7.3=pklCodegenJava
|
||||||
org.jetbrains:markdown:0.7.3=pklCodegenJava
|
org.jetbrains:markdown:0.7.3=pklCodegenJava
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=pklCodegenJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ io.leangen.geantyref:geantyref:1.3.16=pklConfigJava,runtimeClasspath,testCompile
|
|||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
net.java.dev.jna:jna:5.14.0=pklCodegenKotlin
|
net.java.dev.jna:jna:5.14.0=pklCodegenKotlin
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
@@ -56,13 +56,13 @@ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClass
|
|||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,pklCodegenKotlin,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown-jvm:0.7.3=pklCodegenKotlin
|
org.jetbrains:markdown-jvm:0.7.3=pklCodegenKotlin
|
||||||
org.jetbrains:markdown:0.7.3=pklCodegenKotlin
|
org.jetbrains:markdown:0.7.3=pklCodegenKotlin
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=pklCodegenKotlin,pklConfigJava,runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ com.google.code.findbugs:jsr305:3.0.2=compileClasspath,compileOnlyDependenciesMe
|
|||||||
com.palantir.javapoet:javapoet:0.7.0=generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath
|
com.palantir.javapoet:javapoet:0.7.0=generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath
|
||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=compileClasspath,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=compileClasspath,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=compileClasspath,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=compileClasspath,generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
@@ -34,13 +34,13 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=generatorCompileClasspath,generat
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=generatorCompileClasspath,generatorImplementationDependenciesMetadata,generatorRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains:annotations:13.0=generatorCompileClasspath,generatorRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=generatorCompileClasspath,generatorRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathGenerator,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import org.pkl.parser.syntax.Module;
|
|||||||
@TruffleLanguage.Registration(
|
@TruffleLanguage.Registration(
|
||||||
id = "pkl",
|
id = "pkl",
|
||||||
name = "Pkl",
|
name = "Pkl",
|
||||||
version = "0.30.0-dev",
|
version = "0.29.1",
|
||||||
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> {
|
||||||
|
|||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
res1: Int(isEven, isNonZero, isBetween(-10, 10), ) = 6
|
|
||||||
res2: Int(
|
|
||||||
isEven, isNonZero, isBetween(-10, 10),
|
|
||||||
) = 6
|
|
||||||
res3: Int(
|
|
||||||
isEven,
|
|
||||||
isNonZero,
|
|
||||||
isBetween(-10, 10),
|
|
||||||
) = 6
|
|
||||||
-43
@@ -1,43 +0,0 @@
|
|||||||
local lA1 = (a, b, c,) -> true
|
|
||||||
local lA2 = (
|
|
||||||
a, b, c,
|
|
||||||
) -> true
|
|
||||||
local lA3 = (
|
|
||||||
a,
|
|
||||||
b,
|
|
||||||
c,
|
|
||||||
) -> true
|
|
||||||
|
|
||||||
local lB1 = (a: Int, b: Int, c: Int,) -> true
|
|
||||||
local lB2 = (
|
|
||||||
a: Int, b: Int, c: Int,
|
|
||||||
) -> true
|
|
||||||
local lB3 = (
|
|
||||||
a: Int,
|
|
||||||
b: Int,
|
|
||||||
c: Int,
|
|
||||||
) -> true
|
|
||||||
|
|
||||||
local lC1: (Dynamic,) -> Dynamic = new Mixin { a, -> x = true }
|
|
||||||
local lC2: (Dynamic,) -> Dynamic = new Mixin { a, ->
|
|
||||||
x = true
|
|
||||||
}
|
|
||||||
local lC3: (Dynamic,) -> Dynamic = new Mixin {
|
|
||||||
a, -> x = true
|
|
||||||
}
|
|
||||||
local lC4: (Dynamic,) -> Dynamic = new Mixin {
|
|
||||||
a, ->
|
|
||||||
x = true
|
|
||||||
}
|
|
||||||
|
|
||||||
local lD1: (Dynamic,) -> Dynamic = new Mixin { a: Dynamic, -> x = true }
|
|
||||||
local lD2: (Dynamic,) -> Dynamic = new Mixin { a: Dynamic, ->
|
|
||||||
x = true
|
|
||||||
}
|
|
||||||
local lD3: (Dynamic,) -> Dynamic = new Mixin {
|
|
||||||
a: Dynamic, -> x = true
|
|
||||||
}
|
|
||||||
local lD4: (Dynamic,) -> Dynamic = new Mixin {
|
|
||||||
a: Dynamic, ->
|
|
||||||
x = true
|
|
||||||
}
|
|
||||||
-157
@@ -1,157 +0,0 @@
|
|||||||
function moduleMethodA1(a, b, c, ) = true
|
|
||||||
function moduleMethodA2(
|
|
||||||
a, b, c,
|
|
||||||
) = true
|
|
||||||
function moduleMethodA3(
|
|
||||||
a,
|
|
||||||
b,
|
|
||||||
c,
|
|
||||||
) = true
|
|
||||||
function moduleMethodB1(a: Int, b: Int, c: Int, ) = true
|
|
||||||
function moduleMethodB2(
|
|
||||||
a: Int, b: Int, c: Int,
|
|
||||||
) = true
|
|
||||||
function moduleMethodB3(
|
|
||||||
a: Int,
|
|
||||||
b: Int,
|
|
||||||
c: Int,
|
|
||||||
) = true
|
|
||||||
|
|
||||||
class A {
|
|
||||||
function classMethodA1(a, b, c, ) = true
|
|
||||||
function classMethodA2(
|
|
||||||
a, b, c,
|
|
||||||
) = true
|
|
||||||
function classMethodA3(
|
|
||||||
a,
|
|
||||||
b,
|
|
||||||
c,
|
|
||||||
) = true
|
|
||||||
function classMethodB1(a: Int, b: Int, c: Int, ) = true
|
|
||||||
function classMethodB2(
|
|
||||||
a: Int, b: Int, c: Int,
|
|
||||||
) = true
|
|
||||||
function classMethodB3(
|
|
||||||
a: Int,
|
|
||||||
b: Int,
|
|
||||||
c: Int,
|
|
||||||
) = true
|
|
||||||
}
|
|
||||||
|
|
||||||
moduleMethodA1Call1 = moduleMethodA1(1, 2, 3, )
|
|
||||||
moduleMethodA1Call2 = moduleMethodA1(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
moduleMethodA1Call3 = moduleMethodA1(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
moduleMethodA2Call1 = moduleMethodA2(1, 2, 3, )
|
|
||||||
moduleMethodA2Call2 = moduleMethodA2(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
moduleMethodA2Call3 = moduleMethodA2(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
moduleMethodA3Call1 = moduleMethodA3(1, 2, 3, )
|
|
||||||
moduleMethodA3Call2 = moduleMethodA3(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
moduleMethodA3Call3 = moduleMethodA3(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
moduleMethodB1Call1 = moduleMethodB1(1, 2, 3, )
|
|
||||||
moduleMethodB1Call2 = moduleMethodB1(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
moduleMethodB1Call3 = moduleMethodB1(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
moduleMethodB2Call1 = moduleMethodB2(1, 2, 3, )
|
|
||||||
moduleMethodB2Call2 = moduleMethodB2(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
moduleMethodB2Call3 = moduleMethodB2(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
moduleMethodB3Call1 = moduleMethodB3(1, 2, 3, )
|
|
||||||
moduleMethodB3Call2 = moduleMethodB3(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
moduleMethodB3Call3 = moduleMethodB3(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
local a: A = new {}
|
|
||||||
|
|
||||||
classMethodA1Call1 = a.classMethodA1(1, 2, 3, )
|
|
||||||
classMethodA1Call2 = a.classMethodA1(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
classMethodA1Call3 = a.classMethodA1(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
classMethodA2Call1 = a.classMethodA2(1, 2, 3, )
|
|
||||||
classMethodA2Call2 = a.classMethodA2(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
classMethodA2Call3 = a.classMethodA2(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
classMethodA3Call1 = a.classMethodA3(1, 2, 3, )
|
|
||||||
classMethodA3Call2 = a.classMethodA3(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
classMethodA3Call3 = a.classMethodA3(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
classMethodB1Call1 = a.classMethodB1(1, 2, 3, )
|
|
||||||
classMethodB1Call2 = a.classMethodB1(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
classMethodB1Call3 = a.classMethodB1(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
classMethodB2Call1 = a.classMethodB2(1, 2, 3, )
|
|
||||||
classMethodB2Call2 = a.classMethodB2(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
classMethodB2Call3 = a.classMethodB2(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
|
|
||||||
classMethodB3Call1 = a.classMethodB3(1, 2, 3, )
|
|
||||||
classMethodB3Call2 = a.classMethodB3(
|
|
||||||
1, 2, 3,
|
|
||||||
)
|
|
||||||
classMethodB3Call3 = a.classMethodB3(
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
res1: Mapping<String, String,>(!isEmpty) = new Mapping<String, String,> {
|
|
||||||
["hello"] = "world"
|
|
||||||
}
|
|
||||||
+258
-282
File diff suppressed because it is too large
Load Diff
-3
@@ -1,3 +0,0 @@
|
|||||||
res1 = 6
|
|
||||||
res2 = 6
|
|
||||||
res3 = 6
|
|
||||||
-36
@@ -1,36 +0,0 @@
|
|||||||
moduleMethodA1Call1 = true
|
|
||||||
moduleMethodA1Call2 = true
|
|
||||||
moduleMethodA1Call3 = true
|
|
||||||
moduleMethodA2Call1 = true
|
|
||||||
moduleMethodA2Call2 = true
|
|
||||||
moduleMethodA2Call3 = true
|
|
||||||
moduleMethodA3Call1 = true
|
|
||||||
moduleMethodA3Call2 = true
|
|
||||||
moduleMethodA3Call3 = true
|
|
||||||
moduleMethodB1Call1 = true
|
|
||||||
moduleMethodB1Call2 = true
|
|
||||||
moduleMethodB1Call3 = true
|
|
||||||
moduleMethodB2Call1 = true
|
|
||||||
moduleMethodB2Call2 = true
|
|
||||||
moduleMethodB2Call3 = true
|
|
||||||
moduleMethodB3Call1 = true
|
|
||||||
moduleMethodB3Call2 = true
|
|
||||||
moduleMethodB3Call3 = true
|
|
||||||
classMethodA1Call1 = true
|
|
||||||
classMethodA1Call2 = true
|
|
||||||
classMethodA1Call3 = true
|
|
||||||
classMethodA2Call1 = true
|
|
||||||
classMethodA2Call2 = true
|
|
||||||
classMethodA2Call3 = true
|
|
||||||
classMethodA3Call1 = true
|
|
||||||
classMethodA3Call2 = true
|
|
||||||
classMethodA3Call3 = true
|
|
||||||
classMethodB1Call1 = true
|
|
||||||
classMethodB1Call2 = true
|
|
||||||
classMethodB1Call3 = true
|
|
||||||
classMethodB2Call1 = true
|
|
||||||
classMethodB2Call2 = true
|
|
||||||
classMethodB2Call3 = true
|
|
||||||
classMethodB3Call1 = true
|
|
||||||
classMethodB3Call2 = true
|
|
||||||
classMethodB3Call3 = true
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
res1 {
|
|
||||||
["hello"] = "world"
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.core.parser
|
|
||||||
|
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
|
||||||
import org.junit.jupiter.api.Test
|
|
||||||
import org.pkl.core.Evaluator
|
|
||||||
import org.pkl.parser.Parser
|
|
||||||
|
|
||||||
// tests type argument and parameter parsing with trailing commas that cannot be tested with
|
|
||||||
// snippets because these constructs are currently only allowed in the stdlib
|
|
||||||
class TrailingCommasTest {
|
|
||||||
private val evaluator = Evaluator.preconfigured()
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `class type parameter lists parse correctly`() {
|
|
||||||
val module =
|
|
||||||
Parser()
|
|
||||||
.parseModule(
|
|
||||||
"""
|
|
||||||
class Foo<
|
|
||||||
Key,
|
|
||||||
Value,
|
|
||||||
>
|
|
||||||
|
|
||||||
class Bar<
|
|
||||||
Key,
|
|
||||||
Value,
|
|
||||||
> {
|
|
||||||
baz: Key
|
|
||||||
buzz: Value
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
.trimIndent()
|
|
||||||
)
|
|
||||||
|
|
||||||
val fooClass = module.classes.find { it.name.value == "Foo" }
|
|
||||||
assertThat(fooClass).isNotNull
|
|
||||||
assertThat(fooClass!!.typeParameterList?.parameters?.first()?.identifier?.value)
|
|
||||||
.isEqualTo("Key")
|
|
||||||
assertThat(fooClass.typeParameterList?.parameters?.last()?.identifier?.value).isEqualTo("Value")
|
|
||||||
|
|
||||||
val barClass = module.classes.find { it.name.value == "Bar" }
|
|
||||||
assertThat(barClass).isNotNull
|
|
||||||
assertThat(barClass!!.typeParameterList?.parameters?.first()?.identifier?.value)
|
|
||||||
.isEqualTo("Key")
|
|
||||||
assertThat(barClass.typeParameterList?.parameters?.last()?.identifier?.value).isEqualTo("Value")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun `method type parameter lists parse correctly`() {
|
|
||||||
val module =
|
|
||||||
Parser()
|
|
||||||
.parseModule(
|
|
||||||
"""
|
|
||||||
function foo<
|
|
||||||
A,
|
|
||||||
B,
|
|
||||||
>(a: A, b: B,): Value? = "\(a):\(b)"
|
|
||||||
"""
|
|
||||||
.trimIndent()
|
|
||||||
)
|
|
||||||
|
|
||||||
val fooMethod = module.methods.find { it.name.value == "foo" }
|
|
||||||
assertThat(fooMethod).isNotNull
|
|
||||||
assertThat(fooMethod!!.typeParameterList?.parameters?.first()?.identifier?.value).isEqualTo("A")
|
|
||||||
assertThat(fooMethod.typeParameterList?.parameters?.last()?.identifier?.value).isEqualTo("B")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+10
-10
@@ -47,9 +47,9 @@ org.apache.httpcomponents:httpcore:4.4=validator
|
|||||||
org.apache.logging.log4j:log4j-1.2-api:2.17.1=validator
|
org.apache.logging.log4j:log4j-1.2-api:2.17.1=validator
|
||||||
org.apache.logging.log4j:log4j-api:2.17.1=validator
|
org.apache.logging.log4j:log4j-api:2.17.1=validator
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.commonmark:commonmark-ext-gfm-tables:0.25.1=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.commonmark:commonmark-ext-gfm-tables:0.25.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.commonmark:commonmark:0.25.1=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.commonmark:commonmark:0.25.0=compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.eclipse.jetty:jetty-util-ajax:9.4.18.v20190429=validator
|
org.eclipse.jetty:jetty-util-ajax:9.4.18.v20190429=validator
|
||||||
org.eclipse.jetty:jetty-util:9.4.18.v20190429=validator
|
org.eclipse.jetty:jetty-util:9.4.18.v20190429=validator
|
||||||
org.graalvm.js:js-community:24.1.2=testRuntimeClasspath
|
org.graalvm.js:js-community:24.1.2=testRuntimeClasspath
|
||||||
@@ -99,13 +99,13 @@ org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kot
|
|||||||
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown-jvm:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
org.jetbrains:markdown:0.7.3=runtimeClasspath,testRuntimeClasspath
|
||||||
org.jspecify:jspecify:1.0.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jspecify:jspecify:1.0.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=runtimeClasspath,testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=runtimeClasspath,testRuntimeClasspath
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# This file is expected to be part of source control.
|
# This file is expected to be part of source control.
|
||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
||||||
org.assertj:assertj-core:3.27.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.graalvm.polyglot:polyglot:24.1.2=testRuntimeClasspath
|
org.graalvm.polyglot:polyglot:24.1.2=testRuntimeClasspath
|
||||||
org.graalvm.sdk:collections:24.1.2=testRuntimeClasspath
|
org.graalvm.sdk:collections:24.1.2=testRuntimeClasspath
|
||||||
org.graalvm.sdk:graal-sdk:24.1.2=testRuntimeClasspath
|
org.graalvm.sdk:graal-sdk:24.1.2=testRuntimeClasspath
|
||||||
@@ -31,13 +31,13 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=testCompileClasspath,testImplemen
|
|||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
||||||
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jetbrains:annotations:13.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-api:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-engine:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.jupiter:junit-jupiter-params:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-commons:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-commons:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-engine:1.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit.platform:junit-platform-engine:1.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.junit.platform:junit-platform-launcher:1.13.4=testRuntimeClasspath
|
org.junit.platform:junit-platform-launcher:1.13.3=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.13.4=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.junit:junit-bom:5.13.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.msgpack:msgpack-core:0.9.8=testRuntimeClasspath
|
org.msgpack:msgpack-core:0.9.8=testRuntimeClasspath
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
||||||
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
org.organicdesign:Paguro:3.10.3=testRuntimeClasspath
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
# This is a Gradle generated file for dependency locking.
|
|
||||||
# Manual edits can break the build and are not advised.
|
|
||||||
# This file is expected to be part of source control.
|
|
||||||
net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testImplementationDependenciesMetadata
|
|
||||||
org.assertj:assertj-core:3.27.3=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-build-common:2.0.21=kotlinBuildToolsApiClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-build-tools-api:2.0.21=kotlinBuildToolsApiClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-build-tools-impl:2.0.21=kotlinBuildToolsApiClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-compiler-runner:2.0.21=kotlinBuildToolsApiClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-daemon-client:2.0.21=kotlinBuildToolsApiClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-daemon-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.0.21=kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.21=kotlinNativeBundleConfiguration
|
|
||||||
org.jetbrains.kotlin:kotlin-reflect:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-script-runtime:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-common:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-scripting-jvm:2.0.21=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.kotlin:kotlin-stdlib:2.0.21=apiDependenciesMetadata,compileClasspath,implementationDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath
|
|
||||||
org.jetbrains:annotations:13.0=compileClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinKlibCommonizerClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
|
||||||
org.junit.jupiter:junit-jupiter-api:5.13.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.jupiter:junit-jupiter-engine:5.13.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.jupiter:junit-jupiter-params:5.13.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.platform:junit-platform-commons:1.13.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.platform:junit-platform-engine:1.13.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.junit.platform:junit-platform-launcher:1.13.0=testRuntimeClasspath
|
|
||||||
org.junit:junit-bom:5.13.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath
|
|
||||||
empty=annotationProcessor,compileOnlyDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,sourcesJar,testAnnotationProcessor,testApiDependenciesMetadata,testCompileOnlyDependenciesMetadata,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
plugins {
|
|
||||||
pklAllProjects
|
|
||||||
pklKotlinLibrary
|
|
||||||
pklPublishLibrary
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api(projects.pklParser)
|
|
||||||
|
|
||||||
testImplementation(projects.pklCommonsTest)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.test {
|
|
||||||
inputs
|
|
||||||
.dir("src/test/files/FormatterSnippetTests/input")
|
|
||||||
.withPropertyName("formatterSnippetTestsInput")
|
|
||||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
||||||
inputs
|
|
||||||
.dir("src/test/files/FormatterSnippetTests/output")
|
|
||||||
.withPropertyName("formatterSnippetTestsOutput")
|
|
||||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
named<MavenPublication>("library") {
|
|
||||||
pom {
|
|
||||||
url.set("https://github.com/apple/pkl/tree/main/pkl-formatter")
|
|
||||||
description.set("Formatter for Pkl")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.formatter
|
|
||||||
|
|
||||||
import java.nio.file.Files
|
|
||||||
import java.nio.file.Path
|
|
||||||
import org.pkl.formatter.ast.ForceLine
|
|
||||||
import org.pkl.formatter.ast.Nodes
|
|
||||||
import org.pkl.parser.GenericParser
|
|
||||||
|
|
||||||
/** A formatter for Pkl files that applies canonical formatting rules. */
|
|
||||||
class Formatter {
|
|
||||||
/**
|
|
||||||
* Formats a Pkl file from the given file path.
|
|
||||||
*
|
|
||||||
* @param path the path to the Pkl file to format
|
|
||||||
* @return the formatted Pkl source code as a string
|
|
||||||
* @throws java.io.IOException if the file cannot be read
|
|
||||||
*/
|
|
||||||
fun format(path: Path): String {
|
|
||||||
return format(Files.readString(path))
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Formats the given Pkl source code text.
|
|
||||||
*
|
|
||||||
* @param text the Pkl source code to format
|
|
||||||
* @return the formatted Pkl source code as a string
|
|
||||||
*/
|
|
||||||
fun format(text: String): String {
|
|
||||||
val parser = GenericParser()
|
|
||||||
val builder = Builder(text)
|
|
||||||
val gen = Generator()
|
|
||||||
val ast = parser.parseModule(text)
|
|
||||||
val formatAst = builder.format(ast)
|
|
||||||
// force a line at the end of the file
|
|
||||||
gen.generate(Nodes(listOf(formatAst, ForceLine)))
|
|
||||||
return gen.toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.formatter
|
|
||||||
|
|
||||||
import org.pkl.formatter.ast.Empty
|
|
||||||
import org.pkl.formatter.ast.ForceLine
|
|
||||||
import org.pkl.formatter.ast.ForceWrap
|
|
||||||
import org.pkl.formatter.ast.FormatNode
|
|
||||||
import org.pkl.formatter.ast.Group
|
|
||||||
import org.pkl.formatter.ast.IfWrap
|
|
||||||
import org.pkl.formatter.ast.Indent
|
|
||||||
import org.pkl.formatter.ast.Line
|
|
||||||
import org.pkl.formatter.ast.MultilineStringGroup
|
|
||||||
import org.pkl.formatter.ast.Nodes
|
|
||||||
import org.pkl.formatter.ast.Space
|
|
||||||
import org.pkl.formatter.ast.SpaceOrLine
|
|
||||||
import org.pkl.formatter.ast.Text
|
|
||||||
import org.pkl.formatter.ast.Wrap
|
|
||||||
|
|
||||||
internal class Generator {
|
|
||||||
private val buf: StringBuilder = StringBuilder()
|
|
||||||
private var indent: Int = 0
|
|
||||||
private var size: Int = 0
|
|
||||||
private val wrapped: MutableSet<Int> = mutableSetOf()
|
|
||||||
private var shouldAddIndent = false
|
|
||||||
|
|
||||||
fun generate(node: FormatNode) {
|
|
||||||
node(node, Wrap.DETECT)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun node(node: FormatNode, wrap: Wrap) {
|
|
||||||
when (node) {
|
|
||||||
is Empty -> {}
|
|
||||||
is Nodes -> node.nodes.forEach { node(it, wrap) }
|
|
||||||
is Group -> {
|
|
||||||
val width = node.nodes.sumOf { it.width(wrapped) }
|
|
||||||
val wrap =
|
|
||||||
if (size + width > MAX) {
|
|
||||||
wrapped += node.id
|
|
||||||
Wrap.ENABLED
|
|
||||||
} else {
|
|
||||||
Wrap.DETECT
|
|
||||||
}
|
|
||||||
node.nodes.forEach { node(it, wrap) }
|
|
||||||
}
|
|
||||||
is ForceWrap -> {
|
|
||||||
wrapped += node.id
|
|
||||||
val wrap = Wrap.ENABLED
|
|
||||||
node.nodes.forEach { node(it, wrap) }
|
|
||||||
}
|
|
||||||
is IfWrap -> {
|
|
||||||
if (wrapped.contains(node.id)) {
|
|
||||||
node(node.ifWrap, Wrap.ENABLED)
|
|
||||||
} else {
|
|
||||||
node(node.ifNotWrap, wrap)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is Text -> text(node.text)
|
|
||||||
is Line -> {
|
|
||||||
if (wrap.isEnabled()) {
|
|
||||||
newline()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is ForceLine -> newline()
|
|
||||||
is SpaceOrLine -> {
|
|
||||||
if (wrap.isEnabled()) {
|
|
||||||
newline()
|
|
||||||
} else {
|
|
||||||
text(" ")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is Space -> text(" ")
|
|
||||||
is Indent -> {
|
|
||||||
if (wrap.isEnabled() && node.nodes.isNotEmpty()) {
|
|
||||||
size += INDENT.length
|
|
||||||
indent++
|
|
||||||
node.nodes.forEach { node(it, wrap) }
|
|
||||||
indent--
|
|
||||||
} else {
|
|
||||||
node.nodes.forEach { node(it, wrap) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is MultilineStringGroup -> {
|
|
||||||
val indentLength = indent * INDENT.length
|
|
||||||
val offset = (indentLength + 1) - node.endQuoteCol
|
|
||||||
var previousNewline = false
|
|
||||||
for ((i, child) in node.nodes.withIndex()) {
|
|
||||||
when {
|
|
||||||
child is ForceLine -> newline(shouldIndent = false) // don't indent
|
|
||||||
child is Text &&
|
|
||||||
previousNewline &&
|
|
||||||
child.text.isBlank() &&
|
|
||||||
child.text.length == indentLength &&
|
|
||||||
node.nodes[i + 1] is ForceLine -> {}
|
|
||||||
child is Text && previousNewline && offset != 0 -> text(reposition(child.text, offset))
|
|
||||||
else -> node(child, Wrap.DETECT) // always detect wrapping
|
|
||||||
}
|
|
||||||
previousNewline = child is ForceLine
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun text(value: String) {
|
|
||||||
if (shouldAddIndent) {
|
|
||||||
repeat(times = indent) { buf.append(INDENT) }
|
|
||||||
shouldAddIndent = false
|
|
||||||
}
|
|
||||||
size += value.length
|
|
||||||
buf.append(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun newline(shouldIndent: Boolean = true) {
|
|
||||||
size = INDENT.length * indent
|
|
||||||
buf.append('\n')
|
|
||||||
shouldAddIndent = shouldIndent
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun reposition(text: String, offset: Int): String {
|
|
||||||
return if (offset > 0) {
|
|
||||||
" ".repeat(offset) + text
|
|
||||||
} else {
|
|
||||||
text.drop(-offset)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toString(): String {
|
|
||||||
return buf.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
// max line length
|
|
||||||
const val MAX = 100
|
|
||||||
private const val INDENT = " "
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.formatter
|
|
||||||
|
|
||||||
internal class NaturalOrderComparator(private val ignoreCase: Boolean = false) :
|
|
||||||
Comparator<String> {
|
|
||||||
|
|
||||||
override fun compare(s1: String, s2: String): Int {
|
|
||||||
var i = 0
|
|
||||||
var j = 0
|
|
||||||
|
|
||||||
while (i < s1.length && j < s2.length) {
|
|
||||||
val c1 = if (ignoreCase) s1[i].lowercaseChar() else s1[i]
|
|
||||||
val c2 = if (ignoreCase) s2[j].lowercaseChar() else s2[j]
|
|
||||||
|
|
||||||
if (c1.isDigit() && c2.isDigit()) {
|
|
||||||
val (num1, nextI) = getNumber(s1, i)
|
|
||||||
val (num2, nextJ) = getNumber(s2, j)
|
|
||||||
|
|
||||||
val numComparison = num1.compareTo(num2)
|
|
||||||
if (numComparison != 0) {
|
|
||||||
return numComparison
|
|
||||||
}
|
|
||||||
i = nextI
|
|
||||||
j = nextJ
|
|
||||||
} else {
|
|
||||||
val charComparison = c1.compareTo(c2)
|
|
||||||
if (charComparison != 0) {
|
|
||||||
return charComparison
|
|
||||||
}
|
|
||||||
i++
|
|
||||||
j++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return s1.length.compareTo(s2.length)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getNumber(s: String, startIndex: Int): LongAndInt {
|
|
||||||
var i = startIndex
|
|
||||||
val start = i
|
|
||||||
|
|
||||||
while (i < s.length && s[i].isDigit()) {
|
|
||||||
i++
|
|
||||||
}
|
|
||||||
val numStr = s.substring(start, i)
|
|
||||||
val number = numStr.toLongOrNull() ?: 0L
|
|
||||||
return LongAndInt(number, i)
|
|
||||||
}
|
|
||||||
|
|
||||||
// use this instead of Pair to avoid boxing
|
|
||||||
private data class LongAndInt(val l: Long, var i: Int)
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.formatter.ast
|
|
||||||
|
|
||||||
import org.pkl.formatter.Generator
|
|
||||||
|
|
||||||
enum class Wrap {
|
|
||||||
ENABLED,
|
|
||||||
DETECT;
|
|
||||||
|
|
||||||
fun isEnabled(): Boolean = this == ENABLED
|
|
||||||
}
|
|
||||||
|
|
||||||
sealed interface FormatNode {
|
|
||||||
fun width(wrapped: Set<Int>): Int =
|
|
||||||
when (this) {
|
|
||||||
is Nodes -> nodes.sumOf { it.width(wrapped) }
|
|
||||||
is Group -> nodes.sumOf { it.width(wrapped) }
|
|
||||||
is Indent -> nodes.sumOf { it.width(wrapped) }
|
|
||||||
is ForceWrap -> nodes.sumOf { it.width(wrapped + id) }
|
|
||||||
is IfWrap -> if (id in wrapped) ifWrap.width(wrapped) else ifNotWrap.width(wrapped)
|
|
||||||
is Text -> text.length
|
|
||||||
is SpaceOrLine,
|
|
||||||
is Space -> 1
|
|
||||||
is ForceLine,
|
|
||||||
is MultilineStringGroup -> Generator.MAX
|
|
||||||
else -> 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data class Text(val text: String) : FormatNode
|
|
||||||
|
|
||||||
object Empty : FormatNode
|
|
||||||
|
|
||||||
object Line : FormatNode
|
|
||||||
|
|
||||||
object ForceLine : FormatNode
|
|
||||||
|
|
||||||
object SpaceOrLine : FormatNode
|
|
||||||
|
|
||||||
object Space : FormatNode
|
|
||||||
|
|
||||||
data class Indent(val nodes: List<FormatNode>) : FormatNode
|
|
||||||
|
|
||||||
data class Nodes(val nodes: List<FormatNode>) : FormatNode
|
|
||||||
|
|
||||||
data class Group(val id: Int, val nodes: List<FormatNode>) : FormatNode
|
|
||||||
|
|
||||||
data class ForceWrap(val id: Int, val nodes: List<FormatNode>) : FormatNode
|
|
||||||
|
|
||||||
data class MultilineStringGroup(val endQuoteCol: Int, val nodes: List<FormatNode>) : FormatNode
|
|
||||||
|
|
||||||
data class IfWrap(val id: Int, val ifWrap: FormatNode, val ifNotWrap: FormatNode) : FormatNode
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
class Foo {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class Bar
|
|
||||||
{
|
|
||||||
qux = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
class Baz { prop = 0; prop2 = 1 }
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
function fun(a, b, c, d) = a
|
|
||||||
|
|
||||||
noTrailingCommas = fun(1, 2, 3, 4,)
|
|
||||||
|
|
||||||
trailingCommas = fun("loooooooooooooooooooongString", "loooooooooooooooongString", "looooooooooooooooongString", "notTooLong")
|
|
||||||
|
|
||||||
noTrailingCommaObjParams {
|
|
||||||
fooooooooooooooooooooooooooooooooo, baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar, baaaaaaaaaaaaaaaaaaaaaz ->
|
|
||||||
1 + 1
|
|
||||||
}
|
|
||||||
|
|
||||||
trailingCommaInLambdas = (fooooooooooooooooooooooooooooooooo, baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar, baaaaaaaaaaaaaaaaaaaaaz) -> 1
|
|
||||||
|
|
||||||
trailingCommaInConstraints: String(isSomethingSomethingSomething, isSomethingElse, isSomethingSomethingSomethingElse)
|
|
||||||
|
|
||||||
trailingCommaInTypeParameters: Mapping<SomethingSomethingSomethingSomething, SomethingSomething | SomethingElse>
|
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
module comment.interleaved
|
|
||||||
|
|
||||||
local test: Int|String =
|
|
||||||
if (true)
|
|
||||||
1 // It's the same as "100%"
|
|
||||||
else
|
|
||||||
"8%"
|
|
||||||
|
|
||||||
foo: ( // some comment
|
|
||||||
* String(
|
|
||||||
// if dtstart is defined and a datetime, until must also be a datetime if defined
|
|
||||||
true
|
|
||||||
)
|
|
||||||
|Int
|
|
||||||
// trailing comment
|
|
||||||
)?
|
|
||||||
|
|
||||||
foo2: (// some comment
|
|
||||||
Int, // other comment
|
|
||||||
String
|
|
||||||
) ->Int
|
|
||||||
|
|
||||||
bar = ( // some comment
|
|
||||||
10 + 10
|
|
||||||
// another comment
|
|
||||||
)
|
|
||||||
|
|
||||||
bar2 = ( // some comment
|
|
||||||
foo, bar
|
|
||||||
// another comment
|
|
||||||
) -> foo + bar
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
module dangling
|
|
||||||
|
|
||||||
/// Doc comment.
|
|
||||||
///
|
|
||||||
/// for this field
|
|
||||||
// sepearted by a stray comment
|
|
||||||
/// but continues here.
|
|
||||||
some: String
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
//// line 1
|
|
||||||
///// line 2
|
|
||||||
foo = 1
|
|
||||||
|
|
||||||
/// line 1
|
|
||||||
///
|
|
||||||
///
|
|
||||||
/// line 2
|
|
||||||
bar = 1
|
|
||||||
|
|
||||||
///line 1
|
|
||||||
///line 2
|
|
||||||
baz = 1
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
foo {
|
|
||||||
123123123123 + 123123123123 * 123123123123 - 123123123123 / 123123123123 + 123123123123 ** 123123123123
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
}
|
|
||||||
|
|
||||||
bar = clazz.superclass == null || clazz.superclass.reflectee == Module || clazz.superclass.reflectee == Typed
|
|
||||||
|
|
||||||
baz =
|
|
||||||
new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
} |> mixin1 |> mixin2
|
|
||||||
|
|
||||||
qux =
|
|
||||||
(baz) {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
} {
|
|
||||||
3
|
|
||||||
4
|
|
||||||
}
|
|
||||||
|
|
||||||
minus = superLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongVariable - 100000
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
res = myList.map((it) -> it.partition).filter((it) -> someList.contains(it))
|
|
||||||
|
|
||||||
res2 = myList.map(lambda1).filter(lambda2)
|
|
||||||
|
|
||||||
res3 = myList.map((it) -> it.partition)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
foo =
|
|
||||||
if (someCondition) 10000
|
|
||||||
else
|
|
||||||
if (someOtherCondition) 20000
|
|
||||||
else
|
|
||||||
if (someAnotherCondition) 30000
|
|
||||||
else 4
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
foo = let (vaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaariable = 10) 1 * 1
|
|
||||||
|
|
||||||
bar = let (someVariable = new Listing {
|
|
||||||
1
|
|
||||||
}) 1 * 1
|
|
||||||
|
|
||||||
baz =
|
|
||||||
let (someVariable = 10000000)
|
|
||||||
let (someOtherVariable = 2000000)
|
|
||||||
let (someAnotherVariable = 3000000) someVariable + someOtherVariable + someAnotherVariable
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// top level comment
|
|
||||||
|
|
||||||
import "@foo/Foo.pkl" as foo
|
|
||||||
import* "**.pkl"
|
|
||||||
import "pkl:math"
|
|
||||||
|
|
||||||
import "package://example.com/myPackage@1.0.0#/Qux.pkl"
|
|
||||||
import* "file:///tmp/*.pkl"
|
|
||||||
|
|
||||||
|
|
||||||
import "https://example.com/baz.pkl"
|
|
||||||
import "module2.pkl"
|
|
||||||
import "pkl:reflect"
|
|
||||||
import "..."
|
|
||||||
import* "@foo/**.pkl"
|
|
||||||
import "@bar/Bar.pkl"
|
|
||||||
import "Module12.pkl"
|
|
||||||
import "module11.pkl"
|
|
||||||
import "module1.pkl"
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
foo = new {
|
|
||||||
bar = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
baz: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
bar =
|
|
||||||
new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
}
|
|
||||||
|
|
||||||
baz =
|
|
||||||
(foo) {
|
|
||||||
2
|
|
||||||
3
|
|
||||||
}
|
|
||||||
|
|
||||||
qux =
|
|
||||||
(x, y) -> new Listing {
|
|
||||||
x
|
|
||||||
y
|
|
||||||
}
|
|
||||||
|
|
||||||
forGen = new Listing {
|
|
||||||
for (someVar in new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
}) {
|
|
||||||
[someVar] = someVar
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
objParams: Listing<Int> =
|
|
||||||
new {
|
|
||||||
default {
|
|
||||||
key -> key + 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
objParams2: Listing<Int> = new {
|
|
||||||
default { someVeryLongParameter1, someVeryLongParameter2, someVeryLongParameter3, someVeryLongParameter4 ->
|
|
||||||
1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parenType: (ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongType(reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalylongConstraint))
|
|
||||||
|
|
||||||
functionType: (ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongType,ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongType2) -> String
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
module
|
|
||||||
foo.bar.baz
|
|
||||||
amends
|
|
||||||
"bar.pkl"
|
|
||||||
|
|
||||||
import
|
|
||||||
"@foo/Foo.pkl"
|
|
||||||
as foo
|
|
||||||
|
|
||||||
local
|
|
||||||
open
|
|
||||||
class Bar {}
|
|
||||||
|
|
||||||
const
|
|
||||||
local
|
|
||||||
baz = 10
|
|
||||||
|
|
||||||
local
|
|
||||||
function
|
|
||||||
fun(x) =
|
|
||||||
x
|
|
||||||
|
|
||||||
const local prooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooperty: String = "foo"
|
|
||||||
|
|
||||||
local function function2(parameter1: Parameter1Type, parameter2: Parameter2Type, parameter3: Parameter3Type, parameter4: Parameter4Type): String = ""
|
|
||||||
|
|
||||||
local const function function3(parameter1: String|Int, parameter2: String|Int): Mapping<String|Int, String> =
|
|
||||||
new {}
|
|
||||||
|
|
||||||
prop = function2(loooooooooooooooooogParameter1, loooooooooooooooooogParameter2, loooooooooooooooooogParameter3, loooooooooooooooooogParameter4)
|
|
||||||
|
|
||||||
prop2: String
|
|
||||||
|Int
|
|
||||||
|Boolean
|
|
||||||
|
|
||||||
funcParam = fun(
|
|
||||||
(x, y) -> new Listing {
|
|
||||||
x
|
|
||||||
y
|
|
||||||
})
|
|
||||||
|
|
||||||
funcParam2 = aFun(foo, 10 * 10, anotherVariable, if (true) 100000 else 200000, (param1, param2) -> param1 * param2)
|
|
||||||
|
|
||||||
funcParam3 = aFun(foo, 10 * 10, anotherVariable, 200000, (param1, param2) -> param1 * param2)
|
|
||||||
|
|
||||||
funcParam4 = aFun(foo, 10 * 10, anotherVariable, if (true) 100000 else 200000, new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
})
|
|
||||||
|
|
||||||
open local class SomeReallyInterestingClassName<in SomeInParameter, out SomeOutParameter> extends AnotherInterestingClassName {
|
|
||||||
foo: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
local function resourceMapping(type): Mapping<String, unknown> =
|
|
||||||
new Mapping { default = (key) -> (type) { metadata { name = key } } }
|
|
||||||
|
|
||||||
local const function biiiiiiiiiiiiiiiiiiiiiiiiigFunction(param1: String, param2: String(!isBlank)): Boolean
|
|
||||||
|
|
||||||
local const function someFunction(param1: String, param2: String(!isBlank)): Boolean
|
|
||||||
|
|
||||||
local function render(currentIndent: String) =
|
|
||||||
"\(currentIndent)@\(identifier.render(currentIndent))" +
|
|
||||||
if (body == null) "" else " " + body.render(currentIndent)
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
module reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly.loooooooooooooooooooooooooooooooog.naaaaaaaaaaaaaaaaaaaaaaaaaame
|
|
||||||
extends "reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongModule.pkl"
|
|
||||||
|
|
||||||
import "reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongModule.pkl" as foo
|
|
||||||
|
|
||||||
local open class LoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName {}
|
|
||||||
|
|
||||||
local open class ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongName {}
|
|
||||||
|
|
||||||
const hidden loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName = 99
|
|
||||||
|
|
||||||
const hidden reallyLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName = 99
|
|
||||||
|
|
||||||
const local function looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName(x: Int, y) = x + y
|
|
||||||
|
|
||||||
typealias Foo = LooooooooooooooooooooooooongTypeName|AnotherLooooooooooooooooooooooooongTypeName|OtherLooooooooooooooooooooooooongTypeName
|
|
||||||
|
|
||||||
bar: Boolean|Mapping<LooooooooooooooooooooooooooooongTypeName, AnotherLooooooooooooooooooooooooooooongTypeName>(loooooooooooooooooooogConstraint)
|
|
||||||
|
|
||||||
hidden foobar: LongType(someVeryyyyyyyloooong, requirements.might.be.even_loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger)
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
module reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly.loooooooooooooooooooooooooooooooog.naaaaaaaaaaaaaaaaaaaaaaaaaaaaame
|
|
||||||
extends "reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongModule.pkl"
|
|
||||||
|
|
||||||
local reallyLongVariableName = true
|
|
||||||
local anotherReallyLongName = 1
|
|
||||||
local evenLongerVariableName = 2
|
|
||||||
|
|
||||||
/// this property has a reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly long doc comment
|
|
||||||
property = if (reallyLongVariableName) anotherReallyLongName else evenLongerVariableName + anotherReallyLongName
|
|
||||||
|
|
||||||
longString = "reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly long string"
|
|
||||||
|
|
||||||
shortProperty = 1
|
|
||||||
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongVariableName = 10
|
|
||||||
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongVariableName2 =
|
|
||||||
if (reallyLongVariableName) anotherReallyLongName else evenLongerVariableName + anotherReallyLongName
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
foo = Map(1000, "some random string", 20000, "another random string", 30000, "yet another random string")
|
|
||||||
|
|
||||||
incorrect = Map("This has", 1000000, "an incorrect number", 2000000, "of parameters", 30000000, "passed to Map")
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
hidden const foo = 1
|
|
||||||
|
|
||||||
open local class Foo {}
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
// comment
|
|
||||||
// one
|
|
||||||
|
|
||||||
|
|
||||||
/// doc comment
|
|
||||||
|
|
||||||
open
|
|
||||||
module
|
|
||||||
foo
|
|
||||||
.bar
|
|
||||||
|
|
||||||
amends
|
|
||||||
"baz.pkl"
|
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
foo = """
|
|
||||||
asd \(new {
|
|
||||||
bar = 1
|
|
||||||
}) asd
|
|
||||||
"""
|
|
||||||
|
|
||||||
bar = """
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line3
|
|
||||||
"""
|
|
||||||
|
|
||||||
baz = """
|
|
||||||
\n
|
|
||||||
\(bar)
|
|
||||||
line
|
|
||||||
\u{123}
|
|
||||||
"""
|
|
||||||
|
|
||||||
// remove unneeded spaces
|
|
||||||
qux = """
|
|
||||||
foo
|
|
||||||
|
|
||||||
bar
|
|
||||||
|
|
||||||
baz
|
|
||||||
|
|
||||||
\(foo)
|
|
||||||
"""
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
foo: Listing<Int> = new {1 2 3; 4;5 6 7}
|
|
||||||
|
|
||||||
bar: Listing<Int> = new { 1 2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
}
|
|
||||||
|
|
||||||
lineIsTooBig: Listing<Int> = new { 999999; 1000000; 1000001; 1000002; 1000003; 1000004; 1000005; 1000006; 1000007; 1000008; 1000009 }
|
|
||||||
|
|
||||||
lineIsTooBig2 { 999999; 1000000; 1000001; 1000002; 1000003; 1000004; 1000005; 1000006; 1000007; 1000008; 1000009; 1000010 }
|
|
||||||
|
|
||||||
baz = new Dynamic {
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
|
|
||||||
["foo"] = 3; bar = 30
|
|
||||||
|
|
||||||
|
|
||||||
baz = true
|
|
||||||
}
|
|
||||||
|
|
||||||
qux = new Dynamic {1 2 3 prop="prop"; [0]=9}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
/// This file only contains a doc-comment
|
|
||||||
///
|
|
||||||
/// And nothing else
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
|
|
||||||
/// Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc comment
|
|
||||||
@Annotation { looooooooooooooooooooooooooooooooooooooooooooooooooongVariableName = 10 }
|
|
||||||
typealias Foo = String
|
|
||||||
|
|
||||||
/// Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc comment
|
|
||||||
@Annotation { looooooooooooooooooooooooooooooooooooooooooooooooooongVariableName = 10 }
|
|
||||||
foo = "should fit in a single line"
|
|
||||||
|
|
||||||
/// Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc comment
|
|
||||||
@Annotation { looooooooooooooooooooooooooooooooooooooooooooooooooongVariableName = 10 }
|
|
||||||
function bar(x): String = "result: \(x)"
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import"foo.pkl"
|
|
||||||
|
|
||||||
bar=new Listing < Int > ( !isEmpty ){1;2}//a bar
|
|
||||||
|
|
||||||
typealias Typealias=(String,Int)->Boolean
|
|
||||||
|
|
||||||
///a baz
|
|
||||||
///returns its parameter
|
|
||||||
baz = (x,y,z)->x+y+z
|
|
||||||
|
|
||||||
function fun ( x:Int ? ,b :Boolean )= if(b)/***return x**/x else x+bar [0 ]
|
|
||||||
|
|
||||||
prop = trace (1) + super . foo + module .foo
|
|
||||||
|
|
||||||
prop2 {
|
|
||||||
for(x in List(1)) {
|
|
||||||
when(x == 1){
|
|
||||||
x
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
choices: "foo" | * "bar" | String
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
typealias
|
|
||||||
Foo
|
|
||||||
=
|
|
||||||
String
|
|
||||||
|
|
||||||
typealias VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongTypeAlias = String(!isEmpty)
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
foo {
|
|
||||||
when (true)
|
|
||||||
{
|
|
||||||
bar = 1
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
bar = 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
class Foo {}
|
|
||||||
|
|
||||||
class Bar {
|
|
||||||
qux = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
class Baz {
|
|
||||||
prop = 0
|
|
||||||
|
|
||||||
prop2 = 1
|
|
||||||
}
|
|
||||||
-35
@@ -1,35 +0,0 @@
|
|||||||
function fun(a, b, c, d) = a
|
|
||||||
|
|
||||||
noTrailingCommas = fun(1, 2, 3, 4)
|
|
||||||
|
|
||||||
trailingCommas =
|
|
||||||
fun(
|
|
||||||
"loooooooooooooooooooongString",
|
|
||||||
"loooooooooooooooongString",
|
|
||||||
"looooooooooooooooongString",
|
|
||||||
"notTooLong",
|
|
||||||
)
|
|
||||||
|
|
||||||
noTrailingCommaObjParams {
|
|
||||||
fooooooooooooooooooooooooooooooooo,
|
|
||||||
baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar,
|
|
||||||
baaaaaaaaaaaaaaaaaaaaaz ->
|
|
||||||
1 + 1
|
|
||||||
}
|
|
||||||
|
|
||||||
trailingCommaInLambdas = (
|
|
||||||
fooooooooooooooooooooooooooooooooo,
|
|
||||||
baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar,
|
|
||||||
baaaaaaaaaaaaaaaaaaaaaz,
|
|
||||||
) -> 1
|
|
||||||
|
|
||||||
trailingCommaInConstraints: String(
|
|
||||||
isSomethingSomethingSomething,
|
|
||||||
isSomethingElse,
|
|
||||||
isSomethingSomethingSomethingElse,
|
|
||||||
)
|
|
||||||
|
|
||||||
trailingCommaInTypeParameters: Mapping<
|
|
||||||
SomethingSomethingSomethingSomething,
|
|
||||||
SomethingSomething | SomethingElse,
|
|
||||||
>
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
module comment.interleaved
|
|
||||||
|
|
||||||
local test: Int | String =
|
|
||||||
if (true)
|
|
||||||
1 // It's the same as "100%"
|
|
||||||
else
|
|
||||||
"8%"
|
|
||||||
|
|
||||||
foo: ( // some comment
|
|
||||||
*String(
|
|
||||||
// if dtstart is defined and a datetime, until must also be a datetime if defined
|
|
||||||
true,
|
|
||||||
)
|
|
||||||
| Int
|
|
||||||
// trailing comment
|
|
||||||
)?
|
|
||||||
|
|
||||||
foo2: ( // some comment
|
|
||||||
Int, // other comment
|
|
||||||
String,
|
|
||||||
) ->
|
|
||||||
Int
|
|
||||||
|
|
||||||
bar =
|
|
||||||
( // some comment
|
|
||||||
10 + 10
|
|
||||||
// another comment
|
|
||||||
)
|
|
||||||
|
|
||||||
bar2 = ( // some comment
|
|
||||||
foo,
|
|
||||||
bar
|
|
||||||
// another comment
|
|
||||||
) -> foo + bar
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
module dangling
|
|
||||||
|
|
||||||
/// Doc comment.
|
|
||||||
///
|
|
||||||
/// for this field
|
|
||||||
// sepearted by a stray comment
|
|
||||||
/// but continues here.
|
|
||||||
some: String
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/// / line 1
|
|
||||||
/// // line 2
|
|
||||||
foo = 1
|
|
||||||
|
|
||||||
/// line 1
|
|
||||||
///
|
|
||||||
///
|
|
||||||
/// line 2
|
|
||||||
bar = 1
|
|
||||||
|
|
||||||
/// line 1
|
|
||||||
/// line 2
|
|
||||||
baz = 1
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
foo {
|
|
||||||
123123123123
|
|
||||||
+ 123123123123 * 123123123123 -
|
|
||||||
123123123123 / 123123123123
|
|
||||||
+ 123123123123 ** 123123123123
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
}
|
|
||||||
|
|
||||||
bar =
|
|
||||||
clazz.superclass == null
|
|
||||||
|| clazz.superclass.reflectee == Module
|
|
||||||
|| clazz.superclass.reflectee == Typed
|
|
||||||
|
|
||||||
baz =
|
|
||||||
new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
}
|
|
||||||
|> mixin1
|
|
||||||
|> mixin2
|
|
||||||
|
|
||||||
qux = (baz) {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
} {
|
|
||||||
3
|
|
||||||
4
|
|
||||||
}
|
|
||||||
|
|
||||||
minus =
|
|
||||||
superLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongVariable -
|
|
||||||
100000
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
res =
|
|
||||||
myList
|
|
||||||
.map((it) -> it.partition)
|
|
||||||
.filter((it) -> someList.contains(it))
|
|
||||||
|
|
||||||
res2 = myList.map(lambda1).filter(lambda2)
|
|
||||||
|
|
||||||
res3 = myList.map((it) -> it.partition)
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
foo =
|
|
||||||
if (someCondition)
|
|
||||||
10000
|
|
||||||
else if (someOtherCondition)
|
|
||||||
20000
|
|
||||||
else if (someAnotherCondition)
|
|
||||||
30000
|
|
||||||
else
|
|
||||||
4
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
foo =
|
|
||||||
let (vaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaariable =
|
|
||||||
10
|
|
||||||
)
|
|
||||||
1 * 1
|
|
||||||
|
|
||||||
bar =
|
|
||||||
let (someVariable = new Listing {
|
|
||||||
1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
1 * 1
|
|
||||||
|
|
||||||
baz =
|
|
||||||
let (someVariable = 10000000)
|
|
||||||
let (someOtherVariable = 2000000)
|
|
||||||
let (someAnotherVariable = 3000000)
|
|
||||||
someVariable + someOtherVariable + someAnotherVariable
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
// top level comment
|
|
||||||
|
|
||||||
import "https://example.com/baz.pkl"
|
|
||||||
import "package://example.com/myPackage@1.0.0#/Qux.pkl"
|
|
||||||
import "pkl:math"
|
|
||||||
import "pkl:reflect"
|
|
||||||
|
|
||||||
import "@bar/Bar.pkl"
|
|
||||||
import "@foo/Foo.pkl" as foo
|
|
||||||
|
|
||||||
import "..."
|
|
||||||
import "module1.pkl"
|
|
||||||
import "module2.pkl"
|
|
||||||
import "module11.pkl"
|
|
||||||
import "Module12.pkl"
|
|
||||||
|
|
||||||
import* "file:///tmp/*.pkl"
|
|
||||||
|
|
||||||
import* "@foo/**.pkl"
|
|
||||||
|
|
||||||
import* "**.pkl"
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
foo = new {
|
|
||||||
bar = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
class Foo {
|
|
||||||
baz: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
bar = new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
}
|
|
||||||
|
|
||||||
baz = (foo) {
|
|
||||||
2
|
|
||||||
3
|
|
||||||
}
|
|
||||||
|
|
||||||
qux = (x, y) -> new Listing {
|
|
||||||
x
|
|
||||||
y
|
|
||||||
}
|
|
||||||
|
|
||||||
forGen = new Listing {
|
|
||||||
for (
|
|
||||||
someVar in new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
[someVar] = someVar
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
objParams: Listing<Int> = new {
|
|
||||||
default { key ->
|
|
||||||
key + 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
objParams2: Listing<Int> = new {
|
|
||||||
default {
|
|
||||||
someVeryLongParameter1,
|
|
||||||
someVeryLongParameter2,
|
|
||||||
someVeryLongParameter3,
|
|
||||||
someVeryLongParameter4 ->
|
|
||||||
1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parenType: (
|
|
||||||
ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongType(
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalylongConstraint,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
functionType: (
|
|
||||||
ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongType,
|
|
||||||
ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongType2,
|
|
||||||
) ->
|
|
||||||
String
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
module foo.bar.baz
|
|
||||||
|
|
||||||
amends "bar.pkl"
|
|
||||||
|
|
||||||
import "@foo/Foo.pkl" as foo
|
|
||||||
|
|
||||||
open local class Bar {}
|
|
||||||
|
|
||||||
local const baz = 10
|
|
||||||
|
|
||||||
local function fun(x) = x
|
|
||||||
|
|
||||||
local const prooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooperty: String =
|
|
||||||
"foo"
|
|
||||||
|
|
||||||
local function function2(
|
|
||||||
parameter1: Parameter1Type,
|
|
||||||
parameter2: Parameter2Type,
|
|
||||||
parameter3: Parameter3Type,
|
|
||||||
parameter4: Parameter4Type,
|
|
||||||
): String = ""
|
|
||||||
|
|
||||||
local const function function3(
|
|
||||||
parameter1: String | Int,
|
|
||||||
parameter2: String | Int,
|
|
||||||
): Mapping<String | Int, String> = new {}
|
|
||||||
|
|
||||||
prop =
|
|
||||||
function2(
|
|
||||||
loooooooooooooooooogParameter1,
|
|
||||||
loooooooooooooooooogParameter2,
|
|
||||||
loooooooooooooooooogParameter3,
|
|
||||||
loooooooooooooooooogParameter4,
|
|
||||||
)
|
|
||||||
|
|
||||||
prop2: String | Int | Boolean
|
|
||||||
|
|
||||||
funcParam =
|
|
||||||
fun((x, y) -> new Listing {
|
|
||||||
x
|
|
||||||
y
|
|
||||||
})
|
|
||||||
|
|
||||||
funcParam2 =
|
|
||||||
aFun(foo, 10 * 10, anotherVariable, if (true) 100000 else 200000, (param1, param2) ->
|
|
||||||
param1 * param2
|
|
||||||
)
|
|
||||||
|
|
||||||
funcParam3 = aFun(foo, 10 * 10, anotherVariable, 200000, (param1, param2) -> param1 * param2)
|
|
||||||
|
|
||||||
funcParam4 =
|
|
||||||
aFun(foo, 10 * 10, anotherVariable, if (true) 100000 else 200000, new Listing {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
})
|
|
||||||
|
|
||||||
open local class SomeReallyInterestingClassName<in SomeInParameter, out SomeOutParameter>
|
|
||||||
extends AnotherInterestingClassName {
|
|
||||||
foo: Int
|
|
||||||
}
|
|
||||||
|
|
||||||
local function resourceMapping(type): Mapping<String, unknown> = new Mapping {
|
|
||||||
default = (key) -> (type) { metadata { name = key } }
|
|
||||||
}
|
|
||||||
|
|
||||||
local const function biiiiiiiiiiiiiiiiiiiiiiiiigFunction(
|
|
||||||
param1: String,
|
|
||||||
param2: String(!isBlank),
|
|
||||||
): Boolean
|
|
||||||
|
|
||||||
local const function someFunction(param1: String, param2: String(!isBlank)): Boolean
|
|
||||||
|
|
||||||
local function render(currentIndent: String) =
|
|
||||||
"\(currentIndent)@\(identifier.render(currentIndent))"
|
|
||||||
+ if (body == null) "" else " " + body.render(currentIndent)
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
module
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly
|
|
||||||
.loooooooooooooooooooooooooooooooog
|
|
||||||
.naaaaaaaaaaaaaaaaaaaaaaaaaame
|
|
||||||
|
|
||||||
extends
|
|
||||||
"reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongModule.pkl"
|
|
||||||
|
|
||||||
import
|
|
||||||
"reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongModule.pkl"
|
|
||||||
as foo
|
|
||||||
|
|
||||||
open local class LoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongName {}
|
|
||||||
|
|
||||||
open local class ReaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongName {}
|
|
||||||
|
|
||||||
hidden const loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName =
|
|
||||||
99
|
|
||||||
|
|
||||||
hidden const reallyLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName =
|
|
||||||
99
|
|
||||||
|
|
||||||
local const function looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName(
|
|
||||||
x: Int,
|
|
||||||
y,
|
|
||||||
) = x + y
|
|
||||||
|
|
||||||
typealias Foo =
|
|
||||||
LooooooooooooooooooooooooongTypeName
|
|
||||||
| AnotherLooooooooooooooooooooooooongTypeName
|
|
||||||
| OtherLooooooooooooooooooooooooongTypeName
|
|
||||||
|
|
||||||
bar: Boolean
|
|
||||||
| Mapping<
|
|
||||||
LooooooooooooooooooooooooooooongTypeName,
|
|
||||||
AnotherLooooooooooooooooooooooooooooongTypeName,
|
|
||||||
>(loooooooooooooooooooogConstraint)
|
|
||||||
|
|
||||||
hidden foobar: LongType(
|
|
||||||
someVeryyyyyyyloooong,
|
|
||||||
requirements.might.be.even_loooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger,
|
|
||||||
)
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
module
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly
|
|
||||||
.loooooooooooooooooooooooooooooooog
|
|
||||||
.naaaaaaaaaaaaaaaaaaaaaaaaaaaaame
|
|
||||||
|
|
||||||
extends
|
|
||||||
"reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongModule.pkl"
|
|
||||||
|
|
||||||
local reallyLongVariableName = true
|
|
||||||
local anotherReallyLongName = 1
|
|
||||||
local evenLongerVariableName = 2
|
|
||||||
|
|
||||||
/// this property has a reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly long doc comment
|
|
||||||
property =
|
|
||||||
if (reallyLongVariableName)
|
|
||||||
anotherReallyLongName
|
|
||||||
else
|
|
||||||
evenLongerVariableName + anotherReallyLongName
|
|
||||||
|
|
||||||
longString =
|
|
||||||
"reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaly long string"
|
|
||||||
|
|
||||||
shortProperty = 1
|
|
||||||
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongVariableName =
|
|
||||||
10
|
|
||||||
|
|
||||||
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalyLongVariableName2 =
|
|
||||||
if (reallyLongVariableName)
|
|
||||||
anotherReallyLongName
|
|
||||||
else
|
|
||||||
evenLongerVariableName + anotherReallyLongName
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
foo =
|
|
||||||
Map(
|
|
||||||
1000, "some random string",
|
|
||||||
20000, "another random string",
|
|
||||||
30000, "yet another random string",
|
|
||||||
)
|
|
||||||
|
|
||||||
incorrect =
|
|
||||||
Map(
|
|
||||||
"This has", 1000000,
|
|
||||||
"an incorrect number", 2000000,
|
|
||||||
"of parameters", 30000000,
|
|
||||||
"passed to Map",
|
|
||||||
)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
hidden const foo = 1
|
|
||||||
|
|
||||||
open local class Foo {}
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
// comment
|
|
||||||
// one
|
|
||||||
|
|
||||||
/// doc comment
|
|
||||||
open module foo.bar
|
|
||||||
|
|
||||||
amends "baz.pkl"
|
|
||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
foo =
|
|
||||||
"""
|
|
||||||
asd \(new {
|
|
||||||
bar = 1
|
|
||||||
}) asd
|
|
||||||
"""
|
|
||||||
|
|
||||||
bar =
|
|
||||||
"""
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line3
|
|
||||||
"""
|
|
||||||
|
|
||||||
baz =
|
|
||||||
"""
|
|
||||||
\n
|
|
||||||
\(bar)
|
|
||||||
line
|
|
||||||
\u{123}
|
|
||||||
"""
|
|
||||||
|
|
||||||
// remove unneeded spaces
|
|
||||||
qux =
|
|
||||||
"""
|
|
||||||
foo
|
|
||||||
|
|
||||||
bar
|
|
||||||
|
|
||||||
baz
|
|
||||||
|
|
||||||
\(foo)
|
|
||||||
"""
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
foo: Listing<Int> = new { 1; 2; 3; 4; 5; 6; 7 }
|
|
||||||
|
|
||||||
bar: Listing<Int> = new {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
}
|
|
||||||
|
|
||||||
lineIsTooBig: Listing<Int> = new {
|
|
||||||
999999
|
|
||||||
1000000
|
|
||||||
1000001
|
|
||||||
1000002
|
|
||||||
1000003
|
|
||||||
1000004
|
|
||||||
1000005
|
|
||||||
1000006
|
|
||||||
1000007
|
|
||||||
1000008
|
|
||||||
1000009
|
|
||||||
}
|
|
||||||
|
|
||||||
lineIsTooBig2 {
|
|
||||||
999999
|
|
||||||
1000000
|
|
||||||
1000001
|
|
||||||
1000002
|
|
||||||
1000003
|
|
||||||
1000004
|
|
||||||
1000005
|
|
||||||
1000006
|
|
||||||
1000007
|
|
||||||
1000008
|
|
||||||
1000009
|
|
||||||
1000010
|
|
||||||
}
|
|
||||||
|
|
||||||
baz = new Dynamic {
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
|
|
||||||
["foo"] = 3
|
|
||||||
bar = 30
|
|
||||||
|
|
||||||
baz = true
|
|
||||||
}
|
|
||||||
|
|
||||||
qux = new Dynamic { 1; 2; 3; prop = "prop"; [0] = 9 }
|
|
||||||
-3
@@ -1,3 +0,0 @@
|
|||||||
/// This file only contains a doc-comment
|
|
||||||
///
|
|
||||||
/// And nothing else
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/// Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc comment
|
|
||||||
@Annotation { looooooooooooooooooooooooooooooooooooooooooooooooooongVariableName = 10 }
|
|
||||||
typealias Foo = String
|
|
||||||
|
|
||||||
/// Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc comment
|
|
||||||
@Annotation { looooooooooooooooooooooooooooooooooooooooooooooooooongVariableName = 10 }
|
|
||||||
foo = "should fit in a single line"
|
|
||||||
|
|
||||||
/// Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong doc comment
|
|
||||||
@Annotation { looooooooooooooooooooooooooooooooooooooooooooooooooongVariableName = 10 }
|
|
||||||
function bar(x): String = "result: \(x)"
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import "foo.pkl"
|
|
||||||
|
|
||||||
bar = new Listing<Int>(!isEmpty) { 1; 2 } //a bar
|
|
||||||
|
|
||||||
typealias Typealias = (String, Int) -> Boolean
|
|
||||||
|
|
||||||
/// a baz
|
|
||||||
/// returns its parameter
|
|
||||||
baz = (x, y, z) -> x + y + z
|
|
||||||
|
|
||||||
function fun(x: Int?, b: Boolean) = if (b) /***return x**/ x else x + bar[0]
|
|
||||||
|
|
||||||
prop = trace(1) + super.foo + module.foo
|
|
||||||
|
|
||||||
prop2 {
|
|
||||||
for (x in List(1)) {
|
|
||||||
when (x == 1) {
|
|
||||||
x
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
choices: "foo" | *"bar" | String
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
typealias Foo = String
|
|
||||||
|
|
||||||
typealias VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongTypeAlias =
|
|
||||||
String(!isEmpty)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
foo {
|
|
||||||
when (true) {
|
|
||||||
bar = 1
|
|
||||||
} else {
|
|
||||||
bar = 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.formatter
|
|
||||||
|
|
||||||
import org.junit.platform.commons.annotation.Testable
|
|
||||||
|
|
||||||
@Testable class FormatterSnippetTests
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.pkl.formatter
|
|
||||||
|
|
||||||
import java.nio.file.Path
|
|
||||||
import kotlin.io.path.isRegularFile
|
|
||||||
import kotlin.reflect.KClass
|
|
||||||
import org.pkl.commons.test.InputOutputTestEngine
|
|
||||||
import org.pkl.parser.ParserError
|
|
||||||
|
|
||||||
abstract class AbstractFormatterSnippetTestsEngine : InputOutputTestEngine() {
|
|
||||||
|
|
||||||
private val snippetsDir: Path =
|
|
||||||
rootProjectDir.resolve("pkl-formatter/src/test/files/FormatterSnippetTests")
|
|
||||||
|
|
||||||
private val expectedOutputDir: Path = snippetsDir.resolve("output")
|
|
||||||
|
|
||||||
/** Convenience for development; this selects which snippet test(s) to run. */
|
|
||||||
// language=regexp
|
|
||||||
internal val selection: String = ""
|
|
||||||
|
|
||||||
override val includedTests: List<Regex> = listOf(Regex(".*$selection\\.pkl"))
|
|
||||||
|
|
||||||
override val inputDir: Path = snippetsDir.resolve("input")
|
|
||||||
|
|
||||||
override val isInputFile: (Path) -> Boolean = { it.isRegularFile() }
|
|
||||||
|
|
||||||
override fun expectedOutputFileFor(inputFile: Path): Path {
|
|
||||||
val relativePath = relativize(inputFile, inputDir).toString()
|
|
||||||
return expectedOutputDir.resolve(relativePath)
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private fun relativize(path: Path, base: Path): Path {
|
|
||||||
if (System.getProperty("os.name").contains("Windows")) {
|
|
||||||
if (path.isAbsolute && base.isAbsolute && (path.root != base.root)) {
|
|
||||||
return path
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return base.relativize(path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class FormatterSnippetTestsEngine : AbstractFormatterSnippetTestsEngine() {
|
|
||||||
override val testClass: KClass<*> = FormatterSnippetTests::class
|
|
||||||
|
|
||||||
override fun generateOutputFor(inputFile: Path): Pair<Boolean, String> {
|
|
||||||
val formatter = Formatter()
|
|
||||||
val (success, output) =
|
|
||||||
try {
|
|
||||||
val res = formatter.format(inputFile)
|
|
||||||
true to res
|
|
||||||
} catch (_: ParserError) {
|
|
||||||
false to ""
|
|
||||||
}
|
|
||||||
|
|
||||||
return success to output
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user