Skip to content

M2 spine: split cli.php for self-host bundle prep (#1467) - #1499

Merged
PurHur merged 1 commit into
masterfrom
fix/selfhost-src-cli-spine
May 24, 2026
Merged

M2 spine: split cli.php for self-host bundle prep (#1467)#1499
PurHur merged 1 commit into
masterfrom
fix/selfhost-src-cli-spine

Conversation

@PurHur

@PurHur PurHur commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Split src/cli.php into a bundleable compat shim plus src/cli_driver.php (argv/vendor driver loaded by bin/*.php).
  • Add PHP_COMPILER_CLI_SPINE_BUNDLE=1 guard for native spine smoke runs.
  • Fix tokenizer-compat.php define() to use compile-time literal 387 for self-host AOT.
  • Keep src/ units deferred in compiler_lib_spine_smoke — adding them to the 299-unit spine triggers String_.php JIT link failure at current inventory size; infra is ready for M4.

Test plan

  • BOOTSTRAP_LIB_SPINE_SMOKE=1 make bootstrap-selfhost-lib-spine-smoke → OK
  • vendor/bin/phpunit test/unit/BootstrapSelfhostBundleTest.php
  • vendor/bin/phpunit test/unit/MemoryLimitPolicyTest.php

Closes #1467 (partial — spine bundle deferred; driver split unblocks M4).

Made with Cursor

Extract argv/vendor driver to src/cli_driver.php so src/cli.php is a bundleable
compat shim (PHP_COMPILER_CLI_SPINE_BUNDLE). Fix tokenizer-compat define literal
for AOT. Keep src/ units deferred in spine: bundling hits String_.php JIT link
failure at current inventory size; infra ready for M4.
@PurHur
PurHur force-pushed the fix/selfhost-src-cli-spine branch from f71e930 to 345a5c6 Compare May 24, 2026 16:59
@PurHur
PurHur merged commit 467a2cb into master May 24, 2026
@PurHur
PurHur deleted the fix/selfhost-src-cli-spine branch July 16, 2026 00:11
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.

M2 spine: bundle src/cli.php entry shim (#1432 follow-up)

1 participant