Commit Graph
24 Commits
Author SHA1 Message Date
Josh B f56b1bb84f Test and document supercalls using the same method/property name (#943) 2025-02-12 21:10:37 -08:00
Josh B ad99e4a7f7 Correctly set allowed modules/resoures when external reader scheme contain regex control characters (#941) 2025-02-07 14:03:40 -08:00
Josh B 3296dd8a89 Fix NPE when handling ExternalReader specs with null arguments (#882) 2025-01-14 04:51:09 -08:00
Josh B 160e4a5636 YamlRenderer: allow all primitive scalar types as map keys (#879) 2025-01-13 16:22:52 -08:00
Josh B 267de3c789 Fix page size for Linux AArch64 native executables (#875)
Graal Native Image is assuming 4k page size here, which is a naughty assumption to make in the modern Linux-on-ARM landscape.
Two very common hardware configurations require 16k minumum page size: the Raspberry Pi 5 and Asahi Linux (running on Apple Silicon hardware).

This change forces 64k pages for Linux/AArch64 native executables to guarantee compatibility with these platforms.
DEVELOPMENT.adoc is also updated to cover the additional dependencies required for building native executables on Linux.
2025-01-07 15:55:27 +00:00
Josh B 6cab47067b Fix CreateEvaluatorRequest decoding (#853)
Handle case when request specifies external reader with null arguments
2024-12-19 09:59:22 -08:00
Josh BandPhilip K.F. Hölzenspies 0d199892b8 Fix a possible deadlock during external reader process close (#786)
* Fix a possible deadlock during external reader process close

* Apply spotless

---------

Co-authored-by: Philip K.F. Hölzenspies <holzensp@gmail.com>
2024-11-07 11:24:16 +00:00
Josh B 9692504b5f Remove pkl.core.messaging from core APIs (#770) 2024-11-01 14:53:16 -07:00
Josh B fa25fb46fd More external reader refinements (#766)
* org.pkl.core.Readers -> org.pkl.core.Closeables
* Remove coupling between pkl.core.module/resource and pkl.core.messaging
2024-11-01 14:05:45 -07:00
Josh B e217cfcd6f Refine external reader API (#762)
* Encapsulate message transport by removing `ExternalReaderProcess.getTransport` and adding `getModuleResolver` and `getResourceResolver` methods
* Reuse `Random` instances within `ExternalReaderProcessImpl` and module/resource resolvers
* Externalize all `ExternalReaderProcessException` messages
* Add some missing doc comments to `ModuleKeyFactories` and `ResourceReaders` methods for external readers
* Move org.pkl.core.util.Readers to org.pkl.core.Readers
2024-10-31 16:51:25 -07:00
Josh B dd16f7469e pkl-executor: fix loading projects and fix incorrectly thrown PklException
* Load `PklProject` using the same security settings and env vars passed provided via ExecutorSPIOptions
* Handle thrown `PklException` from loading `PklProject` and throw `ExecutorSPIException`
* Handle thrown `PklException` of older Pkl distributions, converting them into `ExecutorSpiException`
2024-10-29 23:29:19 -07:00
Josh B 666f8c3939 Implement SPICE-0009 External Readers (#660)
This adds a new feature, which allows Pkl to read resources and modules from external processes.

Follows the design laid out in SPICE-0009.

Also, this moves most of the messaging API into pkl-core
2024-10-28 18:22:14 -07:00
Josh Bandtranslatenix 4b6bc7bb7c Produce more helpful output when module output is overwritten (#716)
Fix a bug where overwriting `output` causes a PklBugException.

This now produces a more helpful message pointing to the actual problem.

Co-authored-by: translatenix <119817707+translatenix@users.noreply.github.com>
2024-10-24 09:41:59 -07:00
Josh B 069a5d1adc Fix test failures on main (#735) 2024-10-24 11:53:39 +01:00
Josh B f9fe226eba Fix handling of file: module URIs with non-ASCII characters (#696)
Addresses an issue where Pkl cannot evaluate files with non-ASCII characters.
2024-10-23 20:52:40 -07:00
Josh B 62c796a257 Fix double unary minus (#697)
Fix an issue where doubly unary minus (e.g. `--1`) on int/float literals are incorrectly
parsed as single unary minus.
2024-10-17 07:30:00 -07:00
Josh BandDaniel Chao 1e63c48ce4 Add String.splitLimit API (#666)
* Add String.splitLimit API

* Update stdlib/base.pkl

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>

---------

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
2024-10-07 15:28:19 +01:00
Josh B b072794d0d Handle null contents gracefully in message passing API (#657)
In messages "Read Resource Response" and "Read Module Response", if `contents` and `error` are both null, default to an empty byte array/string.

This resolves one of the issues reported in #656
2024-10-01 12:54:06 -07:00
Josh B 7001a42149 [docs] Add documentation for new keyword (#624) 2024-08-29 15:25:14 -07:00
Josh B e5b7e046d9 [docs] Improve searchability of "Methods" section (#625) 2024-08-19 15:54:46 -07:00
Josh B a9c4963a4a [docs] Document the class-as-a-function pattern (#614) 2024-08-15 17:06:56 -07:00
Josh BandDaniel Chao bbdc45656c [docs] Document hidden equality/hashing behavior (#618)
* [docs] Document `hidden` equality/hashing behavior

* Update docs/modules/language-reference/pages/index.adoc

---------

Co-authored-by: Daniel Chao <daniel.h.chao@gmail.com>
2024-08-13 09:56:15 +02:00
Josh B c445770261 [docs] Add mention of "optional" to nullably types section (#613) 2024-08-07 12:18:50 -07:00
Josh B 0405db8d80 [pkl-doc] Sort stdlib first on the main page (#165) 2024-02-16 14:25:49 +01:00