Keep the processor's level on an update over 0.5.0's leftovers, let Rebuild the Game retune, and lift again after the build cache was dropped.

An update decided the lifted code was 0.5.0's generic build from any old-format entry in objects.json, and 0.5.0's
runtime objects stay there for good, so 0.5.0 to 0.6.0 to 0.6.1 recompiled the whole game for generic x86-64. Only
the lifted objects' entries decide now, and entries of objects a build no longer makes are dropped. Rebuild the Game
could not undo it: the compile step's key names no level, so the step read as done before; it now runs when the
recorded level is not this processor's. With Keep Build Cache off the lift is deleted but its key still matched, and
the next compile found nothing to compile: the lift runs again when the compile step will. The two reads of the
compiler's version no longer fail on bytes outside the system's code page.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-09 21:54:31 -05:00
parent 78b3bc5a80
commit ed3db71485
3 changed files with 60 additions and 9 deletions

View File

@@ -197,8 +197,9 @@ The stub swaps `python.next` in while no Python runs, then starts the new versio
The lifted code includes only `cpu.h` and `simd.h`: a change there compiles it all again, which is rare.
- An object an earlier version recorded under its own key form is taken over when its compile and its files are
the same (`ObjectCache.adopt`): 0.6.0's keys, and 0.5.0's, which named the kit's folder. An update keeps the
x86-64 level the game's code was compiled for (`build-cache/obj/lifted-build.json`; generic for the objects of
0.5.0 and earlier); Rebuild the Game compiles it for this processor's (`--retune`).
x86-64 level the game's code was compiled for (`build-cache/obj/lifted-build.json`; generic for the lifted
objects of 0.5.0 and earlier); Rebuild the Game compiles it for this processor's (`--retune`), and runs the
compile step for that even when nothing else changed (`retune_due`).
6. **Swap In the New Build**: lld links `ocarina.exe.new`, which replaces `ocarina.exe` only once it is complete. A
failed rebuild leaves the old build playable; Rebuild the Game tries again.
7. **Prepare the Shaders** is skipped once shaders were prepared before (`shader-prepared.bin`): the game keeps using