Repository navigation
fix(selfhost): unblock fresh-clone patches + M5 cold-boot vendor prelink - #3034
Merged
Merged
Conversation
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>
This was referenced May 28, 2026
Closed
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.
Summary
Two blockers found by building a fresh clone from
masterand runningmake north-star5-verify:script/apply-patches.shaborted underset -euo pipefailatphp-types-magic-script-const: TypeReconstructor anchor not found. The magic-script-const / first-class-callable overlays anchored on the pre-yield-fromresolveOpswitch, butphp-types-yield-from.patchinsertscase 'Expr_YieldFrom':earlier — so neither anchor matched and the whole patch run aborted. No fresh clone could build. Fixed by addingExpr_YieldFromto all 6 overlay anchors.parseAndCompile returned null (parser/CFG spine)for all three vendor bundles. Added a native→Zend cold-boot fallback (Self-host M2: compiled driver segfaults compiling compiler_lib_spine_smoke (bootstrap-selfhost-lib-spine-smoke) #2967 pattern) inscript/bootstrap-vendor-prelink-lib.php: when all rebuild failures are the native parse-spine null, retry once via the Zendbin/compile.phpinvoker. Step 5b now reaches 3/3object_ok.Runtime::parseAndCompile*viaparse → compileEmitSmokefor the emit/inventory drivers (no self-recursive native bridge), regenerated vendor prelink.o/manifest + inventory doc, and fixed a spuriousmkdir(): File existswarning.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
composer install --ignore-platform-reqs→script/apply-patches.shexits 0 and is idempotentmake north-star5-verify→step 5b ok (3/3 ... no vendor/)→OK(exit 0)prelinked/bootstrap-vendor/manifest.json→ 3/3object_okphp script/bootstrap-inventory.php --checkgreenphp -lclean on all changed PHP filesRefs #1492, #1416