Repository navigation
v2.1.0-beta.5
Pre-releasev2.1.0-beta.5
Fifth public preview of the 2.1 line. Clears the
v2.1.0-beta.4 known-issue on remote-Server background
indexing, ships the new Always Index list (re-rolled from the build
that beta.4 had to revert), and reorganizes the Background Indexing
settings into a master switch plus two independently toggleable sub-modes.
This is a beta build — only clients that opted in via
Settings → Updates → Include pre-release versions receive it.
Bug Fixes
Remote-Server background indexing no longer stalls image loading
beta.4 documented the ping-pong: when the Server side of a remote engine
(iOS Simulator, iPad / iPhone over Bonjour, etc.) had background indexing
on, LoadImageForBackgroundIndexingRequest dlopen'd the peer's own
main executable and returned DyldOpenError. The error payload carried
no identifier, the peer envelope-decoded it as keyNotFound, and both
sides ping-ponged on the shared sendSemaphore — image-list pushes,
indexing progress, and on-demand object requests all starved.
Two coordinated fixes ship in this build:
-
_loadImageForBackgroundIndexingshort-circuits already-loaded
images. The BFS routinely visits the peer's own main executable,
whichdlopenrefuses to re-open by definition; on iOS Simulator it
also hits system images whose canonical path differs from dyld's
runtime form due toDYLD_ROOT_PATHrewriting. CheckingimageList
first avoids the spuriousDyldOpenErrorat source. -
canOpenImage/rpaths/dependenciesnow dispatch instead of
reading the client process's dyld directly. The protocol's "pure
local check" assumption only ever worked on the local engine; remote
engines were silently returning empty dependency lists from the
client-sideDyldUtilities.machOImagelookup, so BFS got stuck at
the root and batches only ever indexed the main executable instead
of its full dependency closure. (Wire-format addition:
RuntimeDependencyEntryreplaces the tuple-typed dependencies
return value at the dispatch seam — tuples aren'tCodable. The
manager-facing API is unchanged.)
Communication-layer hardening: per-round-trip nonce + swallow decode failures
Adjacent to the indexing fix, the request/response channel itself got
two structural fixes that prevent any future peer-handler failure from
amplifying into a ping-pong:
- Per-round-trip nonce.
sendRequestused to holdsendSemaphore
from wait-to-resume, so a slow peer handler (e.g. 20 s of section
parsing during background indexing) monopolized the channel and
blocked every other in-flight send at the local outbox. Each round
trip now stamps a UUID nonce,pendingRequestskeys by nonce, and
the semaphore releases as soon as the write returns; concurrent
sends wait on responses in parallel and identifier-keyed collisions
on the routing table are impossible. Wire format is backward
compatible —nonceis optional and absent values fall back to
identifier-keyed routing. - Decode-failure arm swallows silently. The receive catch arm
previously echoed a bareRuntimeNetworkRequestErrorwith no
identifierwhen envelope decode failed, which is what fed the
beta.4 ping-pong. It now splits into two arms: decode failures
swallow silently; handler failures echo via the same nonce-keyed
envelope used by successful responses, so the peer routes the error
back to its matching pending entry instead of re-echoing.
New Features
Always Index list
The user-configurable Always Index list shipping in beta.5 is the
re-rolled version of the feature that beta.4 had to back out at archive
time. Each row pins a single image — either a full path (starting with
/) or a file-name shorthand matched against the loaded image list by
last-path-component — and the background indexer runs that image
through a batch every time a document opens, the runtime engine
changes, or the list itself changes.
Toggle Follow Dependencies on a row to also walk the image's
dependency closure using the same depth as Heuristic Discovery;
otherwise only the image itself is indexed.
Entries that don't match any loaded image are silently skipped and
re-tried on the next fullReload — useful for remote engines whose
imageList populates asynchronously after documentDidOpen.
Background Indexing: master switch + two sub-modes
The Background Indexing settings have been reorganized from a single
toggle into a master switch plus two independently toggleable sub-modes:
- Master switch (
Enable Background Indexing) — overall on/off.
When off, neither sub-mode runs. - Heuristic Discovery — main-executable BFS at document open and
engine swap. Configurabledepth(1...5) lives under this sub-mode. - Always Index — the new list described above.
Max Concurrent Tasks is shared between sub-modes. Each toggle reacts
independently: turning Heuristic Discovery off mid-run cancels only
heuristic batches; Always Index batches keep running, and vice
versa. Flipping the master switch off cancels everything.
Background Indexing popover: grouped by reason
Each section (ACTIVE / HISTORY) now groups its batches by reason
category — Heuristic Discovery / Always Index / Manual — under a
collapsible header instead of rendering one flat list of batches.
Always-index groups flatten one level (entry → item) so single-image
rows show the user-supplied identifier directly.
Improvements
RuntimeMessageChannel stack-overflow guards rolled back
The snapshot-before-loop and AsyncStream<Data> consumer fixes from
beta.3's bec9f4b were a workaround for the @Mutex _modify
coroutine pinning that already got removed in beta.4
(0fdca62 fix(communication): revert @Mutex macro back to manual Mutex<T>).
With the real trigger gone, the guards were dead weight and the
strictly serial drain was incidentally compounding latency when a peer
echoed handler errors at high rate. Reverted in aa8ba43.
RuntimeEngine.imageNodes exposed as nonisolated
imageNodes is now a nonisolated getter backed by the underlying
CurrentValueSubject; mutations still go through the actor-isolated
setImageNodes(_:). Synchronous call sites no longer need an await
hop, which is what gates the Export Multiple Images menu item on
imageNodes.count >= 2 inside validateMenuItem (which runs on the
main thread and can't suspend).
Dependencies
UIFoundation0.10.0 → 0.10.2 (visual-effect opt-out hook,
safe-area anchoring on macOS 11+).RxAppKit0.4.0 → 0.5.0 (drivesrx.itemSelectedoff
selectionDidChangeNotificationso keyboard / type-select
selection events surface alongside clicks — already relied on by
the type-select navigation debounce shipped in beta.4).swift-dependencies1.12.0 → 1.13.0 (declares the trait set the
resolved graph enables; required by release-channel resolves under
USING_LOCAL_DEPENDENCIES=0).
Carried Over From beta.4
All changes from v2.1.0-beta.4 ship unchanged:
@Mutexmacro dropped fromRuntimeMessageChannel; back to the
hand-rolledMutex<T>+withLockform from beta.1.
And from v2.1.0-beta.3 the MachOSwiftSection
0.12.0-beta.3 bump and the wider remote-pin refresh.
And from v2.1.0-beta.2 the Inspector
Relationships tab, Batch Export, selection history, and the
underlying communication-layer hardening.