fix: unbreak CI — drop make -t-incompatible dist co-target + repair getServiceInterface call site#3393
Conversation
0caeca4 to
51129c7
Compare
|
Rebased onto current master and added a commit fixing the CI failure (it was not from the dist changes): Root cause: #3392 ( Fix: reconstruct the same filled-interface lookup inline from the retained Since this is a master-wide breakage (every PR's CI is red against current master), happy to split it into its own fast PR if you'd rather land the master fix ahead of the dist discussion — just say the word. |
#3391's grouped `dist/package.json dist/node_modules/.package-lock.json &:` co-target (to force a rebuild when the bundled node_modules is missing) is incompatible with the ISO build's "Prevent rebuild of compiled artifacts" step, which runs `make -t compiled-<arch>.tar` to mark the downloaded artifacts current. `make -t` reaching the group via `dist/package.json` touches only that target, NOT the grouped sibling stamp — so the stamp stays missing and `make startos-iso` re-runs `make -C start-core dist`, which cascades into a web-UI rebuild that reads an empty config.json and fails (`Unexpected end of file in JSON`). Restore the plain single-target rule, which `make -t` suppresses cleanly. Keeps the projects/start-sdk ls-files dead-edge fix.
#3392 removed util.getServiceInterface from start-core but left this legacy call site using it, breaking the container-runtime tsc build on master. Reconstruct the same filled-interface lookup inline from the retained effects.getServiceInterface + effects.getHostInfo + utils.filledAddress.
51129c7 to
a185be2
Compare
|
Reworked this — you were right that something was actually wrong, and it was my own change. What was breaking Build Image: the ISO job downloads the compiled artifacts and runs
Force/co-target rebuild triggers are fundamentally incompatible with a This PR now: (1) reverts that co-target, and (2) fixes the Net for the original stale- |
Follow-up to #3391. @dr-bonez still hit
Cannot find module 'zod-deep-partial'after a (non-clean) build with #3391 merged.Why #3391 wasn't enough
#3391's grouped co-target catches a missing bundled
node_modules, and therm -rf distrecipes keep a triggered rebuild clean. But neither heals a dist that is present-but-stale: adist/carried across a dependency change (the reorg, a branch switch, an interrupted build) keeps a freshdist/package.jsonmtime while its bundlednode_modulespredates a newly-added dep likezod-deep-partial. mtime gating fundamentally can't see stale content behind a fresh marker, somakedeclares the dist up-to-date, skips the rebuild, and the container-runtime ships without the dep — the same boot error, even after building.I reproduced this exactly: seed
shared-libs/ts-modules/start-core/dist+projects/start-sdk/distto that state (zod removed, fresh markers), run the container-runtime image build, and the image boots toCannot find module 'zod-deep-partial'.Fix — a content gate
Each dist now copies the lock it was built from into
dist/package-lock.json, and the build.mk gate adds aFORCEprerequisite when that copy no longer matches the current source lock (portablecmp -s):node_moduleswas built from a different lock → mismatch → rebuild.dist/package-lock.json) →cmpfails → rebuild. This is the case that heals existing trees like @dr-bonez's — no manual clean needed.cmpmatches → noFORCE, normal mtime gating, no wasted rebuild.Applied to both
start-coreandstart-sdk. The start-core heal cascades into the SDK's vendored copy through the existingstart-core/dist/package.jsondep edge.dist/package-lock.jsonis auto-excluded fromnpm publish(verified vianpm pack --dry-run), so the published SDK is unaffected.Verification
make bundle+ start-core +install-dist-depsall fire) → assembled image has zod (3 copies) and boots past module loading to the expected container-only/media/startos/rpc.makeis a clean no-op (no spurious rebuilds).@dr-bonez — with this you shouldn't need to clean; the next build will detect the stale dist and rebuild it. (If you want to confirm the mechanism first:
cmp -s shared-libs/ts-modules/start-core/package-lock.json shared-libs/ts-modules/start-core/dist/package-lock.json; echo $?— non-zero means it'll force-rebuild.)