Repository navigation
Device lanes: iOS app and APK in the machine-wide native cache, keyed by every build argument and the module assignment; -Onone case code checked to be construction only - #175
Merged
Conversation
…ive cache, keyed by every command argument, the module assignment and the tool inputs; the -Onone case code is checked to be construction only
…ue order (v ? <int> : <int>); a forced rebuild replaces its cache entry
ad27c35 (only Proof guard); the tree is unchanged
Commands: pnpm regen; pnpm run parity:devices; pnpm regen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed (DEVICE-SPEED, COMPILE-SPEED design decision 3; includes #166's stamp Low): the iOS host app and the Android APK now build into #158's machine-wide native cache (
~/.cache/dragon-native, orDRAGON_NATIVE_CACHE, which CI can point at anactions/cachepath). Before, each was reused only inside one worktree.The cache
ios-appandapk.publish), so a hit is always a whole build.pruneCachenow judgesswift,kotlin,ios-appandapktogether (CACHE_KINDS) against the one 3 GB LRU cap, with the trash-then-delete eviction.packages/translate/src/build-cache.ts. It imports Node built-ins only, so parity loads it without the translator. native.ts re-exports the same names, and parity's tsconfig includes that one file.<cache>/debug.keystore), made once with a link, so a concurrent maker's is kept. Every worktree's APK is signed with the same key, and fewer installs need the uninstall-and-retry for a different key.The key (#166 review Low): a sha256 over:
reuseStamp);$Wfor the build directory and$TOKENs for host paths. The commands areiosCommands(each swiftc call with its flags and file list, so the module assignment and each module's-Oor-Ononeare hashed, pluscpandcodesign) andandroidCommands(aapt2, kotlinc, d8, zip, zipalign, apksigner);swiftc -version. The Xcode version is already in the sources.java -version. kotlinc's version is in the sources.The
IOS_BUILDlabel is gone.-jis the$COREStoken, because the parallel width changes no output. An unknown token throws, so no literal$NAMEever reaches a tool.The -Onone content check (optional item): before an iOS build, every DragonCases source (the code built at
-Onone) must be construction code only:if,guard,else, loops,switch,break,continue,throw,tryordefer;v ? 1 : 0;assert,preconditionorfatalError;all judged outside string literals and comments. An enum's
caseis a declaration, so it is allowed. On today's sources: 0 problems, checked in 85 ms.Measured (load 11–43):
Every worktree's first device run, and every land checkout, now skips the app builds unless the app sources changed.
Proof. A full local device run (
appcache, through/tmp/device-lease.sh, both apps from the cache) was compared with master's committed records:deviceRunProblems: no problems;device-failures-*.json: byte-identical (57 iOS, 86 Android);lanes.json: 0 differences outsideevidence.laneCode.Also:
native:build -- --target ios --plant ios-16: still caught by availability checking. The failed build's work directory was removed.native:build -- --target android: the API floor check passes over the cached dex.--plant api-34: still caught.Tests:
ios-appandapkentries are pruned with the harness builds under the one cap.vitest runsuite-errors, device-lanes, lanes-concurrent and state-cases: 119/119 pass.pnpm typecheck: pass.Device step pending: lanes-records, p6a-promotion and device-failures fail only because native-host.ts is in
EVIDENCE_CODE.Outside the spec:
Review round (precomputed review of f15d5ee), head below:
v ? ${t} : ${f}, with numbers that follow the fixture's value order. The exemption is now that whole shape,v ? <int> : <int>, so a fixture whose first case sets a boolean true (v ? 0 : 1) builds.native:build), the fresh build now replaces its entry (replacein build-cache.ts). The old entry is renamed aside, the build renamed in, and the old one deleted, so a forced rebuild repairs a damaged entry. A build another process published in between is kept.native:build -- --target iosreplaced the entry, and the next prebuild hit it.pnpm typecheck: pass.🤖 Generated with Claude Code