Repository navigation
v0.2.5 — Safer Shared State
Features and fixes
- Adopt Starlight v0.2.3, including its value-conversion and wrapped-map fixes, through the library module’s actual version requirement.
- Add
evalandtry_evaltogo_idiomaticfor expressions with explicit, isolated native-data inputs and structured error details. Evaluation shares the caller's cancellation and execution budget; it does not fork a runtime or provide process isolation. (#187) - Add
Machine.SetMaxPrintBytesto bound bytes delivered through the Machine's print handler per execution. It does not bound arbitrary callbacks, direct stderr writes or temporary message allocations. (#183) - Make default SharedDict formatting,
SnapshotString, and Go/script JSON output coordinate without waiting for an occupied lock. Formatting returnsshared_dict(<busy>); JSON returns an error without partial output. Preserve common container-cycle formatting and allow concurrent type-name updates. (#191, #204) - Reject malformed JSON suffixes and invalid schemas before compilation or caching. Preserve unequal values with colliding hashes in
distinct, release its iterators on every return, and correct binarybytes_hexgrouping. (#185, #193, #198, #194, #201) - Correct repeated HTTP form encoding and keep filtered
listdirwalks nonrecursive. Usage documentation and timeout/cancellation regressions now match the supported behavior. (#195, #196)
Output and ownership
SharedDict JSON accepts supported native Starlark data. Other Go-backed values, including GoStruct, GoMap, GoSlice and custom JSON/attribute implementations, must first be converted to independently owned plain data. This prevents arbitrary host callbacks from running under the mapping lock. Raw mutable nested aliases and data shared by separate owners still require common ownership or application synchronization.
Output synchronization, snapshots and data checks add work and temporary memory. Representative measurements retain these safety costs; results depend on data, compiler, machine and load. See the usage guide for errors, ownership and benchmark commands.
Compatibility and security
The library retains Go 1.19 and go.starlark.net v0.0.0-20260324133313-ffb3f39dd27a. It now requires Starlight v0.2.3; selecting this Starlet release brings in that version through normal Go module resolution. Use a supported, security-patched Go compiler for production. Starbox and StarCLI were checked for compatibility; their own declared dependency versions are unchanged by this release.
The pinned interpreter still has its known deep-source parser recursion limitation. Use host-selected, reviewed source and modules. Execution budgets, cancellation and timeouts do not make arbitrary untrusted source safe or provide hard CPU/memory isolation. See SECURITY.md.