Commit Graph

666 Commits

Author SHA1 Message Date
odenix
09435af54f Improve Formatter API (#1505)
- pass `GrammarVersion` to constructor instead of passing it to each
`format` method
- replace `format(Path): String` with `format(Reader, Appendable)`
- instead of picking which overloads besides `format(String): String`
might be useful, offer a single generalized method that streams input
and output
- add `@Throws(IOException::class)` to ensure that Java callers can
catch this exception
- deprecate old methods
2026-04-07 14:16:12 -07:00
odenix
99cbd07518 Update GraalVM to 25.0.1 (#1506)
The latest version (25.0.2) no longer supports macos-x64.
2026-04-07 13:21:19 -07:00
Daniel Chao
8b892f9409 Bump Gradle to 9.4.1 (#1502) 2026-04-07 08:32:43 -07:00
odenix
7dedddcdb1 Update Gradle plugins (#1503) 2026-04-07 06:48:31 -07:00
odenix
623912eca0 Update msgpack to 0.9.11 and slf4j to 2.x (#1501) 2026-04-06 22:00:07 -07:00
odenix
dcd60b8194 Update nu-validator from 20.x to 26.x (#1499)
Also fix incorrect heading level in two Pkldoc tests, as this issue is
now flagged by nu-validator.
2026-04-06 19:25:00 -07:00
odenix
1251843169 Update Kotlin dependencies (#1498) 2026-04-06 12:06:43 -07:00
Daniel Chao
9868c11e5a Disable flaky test (#1497)
Disabling for now due to #1493
2026-04-06 11:39:00 -07:00
odenix
0835c6da82 Update JUnit to 6.x (#1496) 2026-04-06 11:15:55 -07:00
odenix
a8c66938e6 Update dependencies (#1492)
Update dependencies by running `./gradlew updateDependencyLocks`. Most
of the updated dependencies are test dependencies.
2026-04-06 08:22:06 -07:00
Luke Daley
8e7eb2bd96 Fix data race in MessagePack encoder for concurrent server sends (#1486) 2026-04-04 14:26:16 -07:00
odenix
58033598c7 Fix Javadoc and kotlinc warnings (#1490) 2026-04-03 14:32:34 -07:00
Islon Scherer
bc503d4d60 Make the build work on jdk 25 (#1483)
The old version of googleJavaFormat we were using called some deprecated
function.
2026-03-31 09:38:36 +02:00
Jen Basch
82afa8b90b Port 0.31.1 changelog to main (#1476)
Co-authored-by: Islon Scherer <i_desouzascherer@apple.com>
2026-03-26 09:41:01 -07:00
Islon Scherer
dc5504749a Disable gradle cache for release builds (#1474) 2026-03-26 16:54:10 +01:00
Jen Basch
a9c890e2f9 Do not activate power assertions when a single union member containing a type constraint fails (#1462)
Prior to this change, this code would activate powers assertions /
instrumentation permanently:
```pkl
foo: String(contains("a")) | String(contains("b")) = "boo"
```

This is because the `contains("a")` constraint would fail, triggering
power assertions, but the subsequent check of the union's
`contains("b")` branch would succeed.
As observed in #1419, once instrumentation is enabled, all subsequent
evaluation slows significantly.
As with #1419, the fix here is to disable power assertions via
`VmLocalContext` until we know that all union members failed type
checking; then, each member is re-executed with power assertions allowed
to provide the improved user-facing error.
2026-03-25 11:52:37 -07:00
Jen Basch
f23c37a993 Prevent --multiple-file-output-path writes from following symlinks outside the target directory (#1467) 2026-03-25 11:50:20 -07:00
Jen Basch
cdc6fa8aec Prevent I/O when checking UNC paths against --root-dir (#1466)
Test on [windows] please
2026-03-25 11:40:51 -07:00
Jen Basch
1104f12362 Allow custom/external resources to be "not found" (#1471)
This allows custom/external resources to produce `null` values for
nullable reads (`read?`)

Ref: https://github.com/apple/pkl-go/issues/157
2026-03-24 12:43:44 -07:00
Jen Basch
cce84d7ccc Correct SecurityManager check for HTTP(S) module URIs (#1463) 2026-03-23 07:43:07 -07:00
Jen Basch
a6db476c70 Fix module reflection when instrumentation is active (#1464) 2026-03-23 07:42:40 -07:00
splint-disk-8i
3f3271d3b1 Update deprecated OpenJDK links in DEVELOPMENT.adoc (#1468)
Fixes broken links and grammar in DEVELOPMENT.adoc:

- Mailing list URL: openjdk.java.net → openjdk.org (old domain returns
301)
- Truffle FAQ link: old OpenJDK wiki is gone (404) — replaced with
current GraalVM Truffle docs
- Grammar: "enables to run" → "enables you to run"
- Grammar: "jenv use specific" → "jenv uses specific"
2026-03-16 10:27:12 -07:00
dependabot[bot]
46da9cb33a Bump actions/create-github-app-token from 2.2.1 to 2.2.2 (#1469) 2026-03-16 09:55:09 -07:00
Jen Basch
3eda3b197e Bump pkl.impl.ghactions to version 1.5.0 (#1460) 2026-03-03 17:59:39 -08:00
Jen Basch
0e685591eb Respect --omit-project-settings for all evaluator options (#1459) 2026-03-03 16:23:42 -08:00
dependabot[bot]
51bb1a5c7e Bump gradle/actions from 5.0.1 to 5.0.2 (#1456) 2026-03-02 09:00:50 -08:00
layla
7c5a80a584 Fix typo: recieve to receive (#1455) 2026-03-01 13:43:29 -08:00
Kushal Pisavadia
f9b880be85 Fix command typealias unwrapping in resolveType (#1449)
The loop unwraps nullables and constraints but breaks straight away
after a `typealias`. This means the nullable is missed. Removing the
`break` fixes it.

## Exception

```
org.pkl.core.PklException: –– Pkl Error ––
Command option property `foo` has unsupported type `String?`.

11 | foo: OptionalString
     ^^^^^^^^^^^^^^^^^^^
at <unknown> (file:///var/folders/xh/lmp1n6qj4m13t53cfmbqnkwh0000gn/T/junit-1378070630576324311/cmd.pkl)

Use a supported type or define a transformEach and/or transformAll function
```
2026-02-27 13:33:00 -08:00
Jen Basch
7119526245 Fix typo in 0.31 release notes (#1450) 2026-02-27 13:18:10 -08:00
Kushal Pisavadia
64ea7951db Fix stream double-consumption in CommandSpecParser (#1448)
The `choices` stream was consumed eagerly for metavar construction, then
captured in a lambda for later validation—which promptly fell over with
`IllegalStateException`. Materialise to a `List` straightaway.
2026-02-27 10:04:32 +00:00
Islon Scherer
cac3e483b5 Start next dev iteration 2026-02-26 09:51:27 -08:00
Islon Scherer
4d35f18309 Prepare 0.31.0 release 2026-02-26 09:51:27 -08:00
Jen Basch
4cf2a1b42c Allow command options to have nullable types and default values (#1444) 2026-02-26 08:34:46 -08:00
Jen Basch
3ef065b6b6 Correct --root-dir check to also work for jar:file: URIs (#1442) 2026-02-25 10:57:01 -08:00
Jen Basch
be21c34938 Allow command transformAll functions to perform imports (#1440) 2026-02-25 08:03:53 -08:00
Jen Basch
2e4d73b957 Fix regression in CLI error handling when project loading fails (#1439) 2026-02-25 01:28:05 -08:00
Jen Basch
28b09134d7 Add release notes for 0.31 (#1438) 2026-02-24 08:56:16 -08:00
Jen Basch
4611d181a8 Remove broken Collection.transpose method (#1437) 2026-02-24 08:09:52 -08:00
Jen Basch
12915f520f Fix command error and import handling (#1436) 2026-02-24 08:09:25 -08:00
Jen Basch
2ec0baad53 Allow referring to remote project dependencies on the CLI with @-notation (#1434) 2026-02-23 08:52:56 -08:00
dependabot[bot]
77395a86f4 Bump EnricoMi/publish-unit-test-result-action from 2.22.0 to 2.23.0 (#1435) 2026-02-23 08:51:04 -08:00
Jen Basch
a5dc91f0a5 Command flag behavior improvements (#1432)
* Forbid overlap of built-in and command-defined flag names 
* Allow interleaving built-in and command-defined flags on the command
line
* List abbreviated flag names first, matching the behavior of built-in
flags
2026-02-20 12:00:18 -08:00
Jen Basch
08712e8b26 Fix display of evaluation errors thrown by command convert/transformAll (#1431) 2026-02-20 07:51:33 -08:00
Jen Basch
e07868b404 Handle lexer errors in pkl format (#1430)
Resolves #1421
2026-02-19 10:00:00 -08:00
Jen Basch
72a57af164 SPICE-0025: pkl run CLI framework (#1367) 2026-02-12 07:53:02 -08:00
Jen Basch
63a20dd453 Improve org.pkl.formatter.Formatter JVM API (#1428)
Makes for less fussing around to consume this API from the Gradle side
2026-02-11 09:22:42 -08:00
Islon Scherer
60f628eb36 Fix possible race condition during module and resource reading (#1426) 2026-02-11 11:18:11 +01:00
Jen Basch
817e433a7f Document annotations and annotation converters (#1427) 2026-02-09 10:19:47 -08:00
Islon Scherer
08d8c8ec7a Improve import formatting (#1424) 2026-02-06 17:57:50 +01:00
Jen Basch
effa4844e6 Bump pkl.impl.ghactions to version 1.3.5 (#1422) 2026-02-06 08:43:45 -08:00