mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
A facet listed before another facet whose directory it imports from loaded a second copy of that module; register all roots first so every facet of one load shares one copy, whatever the order.
2.7 KiB
2.7 KiB
Changelog
[Unreleased]
Fixed
nodeLoaderregisters every facet's directory before importing any, so a facet that imports a file of a facet listed after it gets the same module copy as that facet; before, the load order could produce duplicates.- A link that is already closed when a host accepts or routes to it is no longer kept as a connection: before, a route that returned a dead link (a child process that exited before its link was wrapped) made every later call to that host name fail with
unavailableuntil restart, and leaked the connection's ping timer. - Fixed
processLock()failing withlisten EINVALon macOS and the BSDs when the temporary directory is too deep for a socket path (sun_path holds 104 bytes); the lock socket then lives in a private per-user directory,/tmp/chord2-<uid>
[1.2.0] - 2026-10-12
Breaking Changes
- Replaced the facet and service runtime with a typed host runtime: contracts (
local,remote,method,opaque) are runtime values described with TypeBox schemas, objects are served by hosts (createHost,defineFacet,defineRegistry) and reached through handles, and hosts exchange JSON frames over memory, Node IPC, or WebSocket links (memoryLinkPair,ipcLink,webSocketLink,acceptWebSockets), with hot reload of plugins. Seedocs/tutorial.mdanddocs/guide.md - Removed
defineService,createFacetHost,createRemoteServiceBinding,createStaticFacetLoader,combineFacetLoaders, the remote-service endpoint, provider, error, and wire helpers, and their types. The olddefineFacet,Facet, andFacetLoaderare replaced by the new runtime's names of the same spelling - Removed the
./bundlerexport and the facet bundle loaders of./node;./nodenow exports the child host manager (createHostManager,forkDriver,childControl,processLock) and the facet module loadernodeLoader - Removed
@earendil-works/pi-client,@earendil-works/pi-protocol, and@earendil-works/pi-server, which served only the old runtime; they are no longer released
Changed
replicatedState,copyJson,isJsonValue,Context,JsonValue,JsonRepresentation,Draft, and the replicated state types keep their names on the root export;./contextand./deltaare unchanged, and./contextalso exports theContextandContextKeytypes- Depends on
typeboxinstead ofesbuild
Fixed
- Fixed appending to an array costing a walk over the whole array: the delta tracker now plans inserts and removals that keep the remaining elements in order from the changed ranges alone, and
applyImmutablebuilds an appended array in one copy instead of two. 32,000 one-item appends, one commit each, take 1.4 s instead of 11.3 s