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.
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"
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
```
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.
* 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
Bumps [gradle/actions](https://github.com/gradle/actions) from 5.0.0 to
5.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gradle/actions/releases">gradle/actions's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump <code>npm</code> code dependency versions</li>
<li>Bump Gradle versions used in sample builds</li>
<li>Bump dependencies versions in Gradle sample builds</li>
<li>Bump GitHub actions used for build and test</li>
<li>Update known wrapper checksums to include Gradle 9.2+</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gradle/actions/compare/v5.0.0...v5.0.1">https://github.com/gradle/actions/compare/v5.0.0...v5.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f29f5a9d7b"><code>f29f5a9</code></a>
Attempt to fix flaky caching tests (<a
href="https://redirect.github.com/gradle/actions/issues/836">#836</a>)</li>
<li><a
href="8c7f3ffba4"><code>8c7f3ff</code></a>
Bump to v1.4.1 of the dependency-submission plugin</li>
<li><a
href="85e9805d21"><code>85e9805</code></a>
[bot] Update dist directory</li>
<li><a
href="acb81f1e15"><code>acb81f1</code></a>
Bump the npm-dependencies group across 1 directory with 8 updates (<a
href="https://redirect.github.com/gradle/actions/issues/821">#821</a>)</li>
<li><a
href="00660c8721"><code>00660c8</code></a>
Bump github/codeql-action from 4.31.10 to 4.32.0 in the github-actions
group ...</li>
<li><a
href="d498ad3b5f"><code>d498ad3</code></a>
[bot] Update dist directory</li>
<li><a
href="de83f33963"><code>de83f33</code></a>
Update Gradle version and Gradle dependencies (<a
href="https://redirect.github.com/gradle/actions/issues/834">#834</a>)</li>
<li><a
href="baabf402fa"><code>baabf40</code></a>
Bump the github-actions group across 2 directories with 5 updates</li>
<li><a
href="69353a9e14"><code>69353a9</code></a>
Bump the gradle group across 1 directory with 4 updates</li>
<li><a
href="221c7f4dbd"><code>221c7f4</code></a>
Update known wrapper checksums</li>
<li>Additional commits viewable in <a
href="4d9f0ba002...f29f5a9d7b">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This enables defining declarative key and/or value transformations in
cases where neither `Class`- nor path-based converters can be applied
gracefully. It is also the only way to express transforming the
resulting property names in `Typed` objects without applying a converter
to the entire containing type, which is cumbersome at best.
SPICE: https://github.com/apple/pkl-evolution/pull/26