This changes the `join` method in `List`/`Set`/`Listing` to call the overridden `toString()` method. This is a breaking change, but is considered a bugfix.
138 lines
3.4 KiB
Plaintext
138 lines
3.4 KiB
Plaintext
= Pkl 0.33 Release Notes
|
|
:version: 0.33
|
|
:version-minor: 0.33.0
|
|
:release-date: XXX
|
|
:version-next: 0.34
|
|
:version-next-date: February 2027
|
|
|
|
include::partial$intro.adoc[]
|
|
|
|
== Highlights [small]#💖#
|
|
|
|
=== XXX
|
|
|
|
== Noteworthy [small]#🎶#
|
|
|
|
=== CLI Changes
|
|
|
|
==== Default file locations
|
|
|
|
For new setups, the CLI no longer stores anything under `~/.pkl` (https://github.com/apple/pkl/pull/1809[#1809]).
|
|
|
|
It uses XDG-style locations on Unix and Known Folder locations on Windows:
|
|
|
|
[cols="1,2,2,2",options="header"]
|
|
|===
|
|
| Concern | Unix (Linux/macOS) | Windows | Legacy fallback
|
|
|
|
| Package cache
|
|
| `~/.cache/pkl`
|
|
| `$LOCALAPPDATA/pkl/Cache`
|
|
| none
|
|
|
|
| Settings file
|
|
| `~/.config/pkl/settings.pkl`
|
|
| `$APPDATA/pkl/settings.pkl`
|
|
| `~/.pkl/settings.pkl`
|
|
|
|
| CA certificates
|
|
| `~/.config/pkl/cacerts`
|
|
| `$APPDATA/pkl/cacerts`
|
|
| `~/.pkl/cacerts`
|
|
|
|
| REPL history
|
|
| `~/.local/state/pkl/repl-history`
|
|
| `$LOCALAPPDATA/pkl/repl-history`
|
|
| none
|
|
|===
|
|
|
|
On every OS, these locations can be overridden with XDG-style env vars.
|
|
For example, setting `XDG_CACHE_HOME` will configure the cache directory.
|
|
|
|
Note that the existing `~/.pkl/cache` directory is ignored, so Pkl will download packages to populate its cache if configured to do so.
|
|
|
|
== Breaking Changes [small]#💔#
|
|
|
|
=== Removal of macOS amd64 (Intel) Binaries
|
|
|
|
Native `pkl` and `pkldoc` binaries for Intel Mac systems are no longer published with Pkl releases.
|
|
|
|
To continue running new Pkl releases on these systems, use an appropriate Java runtime and the `jpkl` and `jpkldoc` Java executables.
|
|
|
|
=== Type check changes for `Class<T>`
|
|
|
|
In prior versions of Pkl, type arguments to the `Class` type were erased.
|
|
Any `Class` value would typecheck against `Class<T>` for any value of `T`.
|
|
|
|
In Pkl 0.33, this erasure has been removed.
|
|
A `Class` value typechecked against `Class<T>` must be a subclass of `T`.
|
|
|
|
If `T` does not resolve to a class type (i.e. it is a union type, nullable type, string literal type, parameterized type, or `nothing`), the type check will always fail.
|
|
|
|
=== Standard library `external` module properties are now marked `const`
|
|
|
|
Previously, module properties in `pkl:math` and `pkl:release` could be overriden by amending the module.
|
|
Doing this makes little sense—these value are constants and overriding them by amending their module would be odd.
|
|
|
|
This is a breaking change for code that looks like this:
|
|
[source,pkl]
|
|
----
|
|
bogusMath = (import("pkl:math")) {
|
|
minInt = -1
|
|
}
|
|
----
|
|
|
|
=== Changes to `join` method on `List`, `Set`, and `Listing`
|
|
|
|
The `join` method in `List`, `Set`, and `Listing` will now call the `toString()` method if overridden on an object (https://github.com/apple/pkl/pull/1872[#1872]).
|
|
|
|
This is a breaking change, but is also considered a bugfix.
|
|
|
|
The following snippet will produce different results:
|
|
|
|
[source,pkl]
|
|
----
|
|
class Bird {
|
|
name: String
|
|
|
|
function toString() = "{ My name is \(name) }"
|
|
}
|
|
|
|
hidden birds: Listing<Bird> = new {
|
|
new { name = "Osprey" }
|
|
new { name = "Eagle" }
|
|
}
|
|
|
|
res = birds.join("\n")
|
|
----
|
|
|
|
Currently, Pkl ignores the `toString()` override, and produces:
|
|
|
|
[source,pkl]
|
|
----
|
|
res = """
|
|
new Bird { name = "Osprey" }
|
|
new Bird { name = "Eagle" }
|
|
"""
|
|
----
|
|
|
|
In Pkl 0.33, the overridden `toString()` will be called, and produces:
|
|
|
|
[source,pkl]
|
|
----
|
|
res = """
|
|
{ My name is Osprey }
|
|
{ My name is Eagle }
|
|
"""
|
|
----
|
|
|
|
== Bug Fixes [small]#🐜#
|
|
|
|
* XXX
|
|
|
|
== Contributors [small]#🙏#
|
|
|
|
We would like to thank the contributors to this release (in alphabetical order):
|
|
|
|
* XXX
|