Commit Graph

10 Commits

Author SHA1 Message Date
Jen Basch
7119526245 Fix typo in 0.31 release notes (#1450) 2026-02-27 13:18:10 -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
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
Islon Scherer
08d8c8ec7a Improve import formatting (#1424) 2026-02-06 17:57:50 +01:00
Daniel Chao
ed0cad668f Fix Function.toString (#1411)
Fixes an issue where the underlying default Java toString() is leaking
through
2026-01-21 07:29:58 -08:00
Daniel Chao
03a7676e64 Implement power assertions (#1384)
This adds power assertions to Pkl!

This implements the SPICE described in
https://github.com/apple/pkl-evolution/pull/29

This follows the power assertions style of reporting also found in
Groovy, Kotlin, and others.

* Literal values are not emitted in the diagram
* Stdlib constructors of literals like `List(1, 2)` are also considered
  literals

Power assertions are added to:

* Failing type constraints
* Failing test facts

Power assertions are implemented as a truffle instrument to observe
execution.
When an assertion fails, the instrument is created and the assertion is
run again to observe facts.
This incurs runtime overhead to collect facts, but has no impact on code
in the non-error case.

---------

Co-authored-by: Islon Scherer <islonscherer@gmail.com>
2026-01-20 21:41:33 -08:00
Daniel Chao
ac4f2fd9a6 Add isNotEmpty, isNotBlank methods (#1396)
Adds convenience methods `isNotEmpty` and `isNotBlank`. This borrows the
same methods from Kotlin.

This helps users write more fluent constraints, for example,
`foo.isNotEmpty.implies(bar)`.

Adds:

* List#isNotEmpty
* Map#isNotEmpty
* Set#isNotEmpty
* Mapping#isNotEmpty
* Listing#isNotEmpty
* String#isNotEmpty
* String#isNotBlank
2026-01-08 13:22:43 -08:00
Dan Chao
4d70baba86 Start next dev iteration 2025-11-03 12:26:58 -08:00