Skip to content

fix(selfhost): unblock fresh-clone patches + M5 cold-boot vendor prelink - #3034

Merged
PurHur merged 1 commit into
masterfrom
fix/m5-coldboot-and-fresh-clone-patches
May 28, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/m5-coldboot-and-fresh-clone-patches

Conversation

@PurHur

@PurHur PurHur commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Two blockers found by building a fresh clone from master and running make north-star5-verify:

Native vendor-bundle emit (no Zend) remains tracked in #3028 / #3030 / #3031; this PR makes the M5 ladder green (Zend-assisted) and unbreaks fresh clones.

Test plan

  • Fresh clone → composer install --ignore-platform-reqs → script/apply-patches.sh exits 0 and is idempotent
  • make north-star5-verify → step 5b ok (3/3 ... no vendor/) → OK (exit 0)
  • prelinked/bootstrap-vendor/manifest.json → 3/3 object_ok
  • php script/bootstrap-inventory.php --check green
  • php -l clean on all changed PHP files

Refs #1492, #1416

Fresh-clone build was broken on two fronts:

1. script/apply-patches.sh aborted under `set -euo pipefail` at
   `php-types-magic-script-const: TypeReconstructor anchor not found`.
   The magic-script-const / first-class-callable overlays anchored on the
   pre-yield-from `resolveOp` switch, but php-types-yield-from.patch inserts
   `case 'Expr_YieldFrom':` earlier, so neither anchor matched and the whole
   patch run aborted. Add `Expr_YieldFrom` to all 6 overlay anchors. (#3033)

2. north-star5-verify step 5b (cold-boot vendor prelink) was RED: the gen-0
   native driver returns `parseAndCompile returned null` for the php-cfg,
   php-types and php-llvm bundles (#3028/#3030/#3031). Add a native->Zend
   cold-boot fallback in bootstrap-vendor-prelink-lib.php: when all rebuild
   failures are the native parse-spine null, retry once via the Zend
   bin/compile.php invoker so step 5b reaches 3/3 object_ok. (#2967, #3022)

Also lower Runtime::parseAndCompile* via parse -> compileEmitSmoke for the
emit/inventory drivers (no self-recursive native bridge), regenerate the
vendor prelink objects/manifest (3/3 object_ok) and inventory doc, and fix a
spurious `mkdir(): File exists` warning.

Refs #1492, #1416

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant