Skip to content

fix(m5): surface parseAndCompile failure text in native vendor invoker (#3037)#3084

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-3037-parse-failure-diagnostics
May 29, 2026
Merged

fix(m5): surface parseAndCompile failure text in native vendor invoker (#3037)#3084
PurHur merged 1 commit into
masterfrom
agent/issue-3037-parse-failure-diagnostics

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 29, 2026

Summary

  • Add Runtime::getLastParseFailure() / peekLastParseFailure() to capture the last parse/compile diagnostic (exceptions and null-block returns).
  • Record failures in compile(), compileEmitSmoke(), and emitParseCompileFailureStderr(); clear on new parseAndCompile* runs.
  • M3 native LLVM bridge (BootstrapCompileSmokeM3Emit) appends — {detail} on parseAndCompile null and records split parse+compile failures via noteParseCompileNullForScript().
  • bin/compile.php, compile driver, and bootstrap smoke scripts use the stored failure text instead of silent null.

Closes #3037

php-src reference

N/A — self-host diagnostics (Zend parity is matching actionable parseAndCompile failure: output from host PHP invoker).

Test plan

  • ./script/docker-exec.sh -- bash -lc './vendor/bin/phpunit test/unit/RuntimeAotLintTest.php --filter GetLastParseFailure'
  • ./script/docker-exec.sh -- bash -lc './vendor/bin/phpunit test/unit/BootstrapRuntimeCompileSmokeTest.php --filter testM3EmitTuRealLoweringSkipsEarlyParseStubDecl'
  • ./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-helloworld' (optional M3 probe when LLVM available)

Claim note

GitHub issue comment API returned 401 in this harness; branch agent/issue-3037-parse-failure-diagnostics claims lane B issue #3037 for this run.

Made with Cursor

#3037)

Record last parse/compile diagnostics in Runtime and echo them from the
M3 emit LLVM bridge so native vendor compiles match Zend failure output.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 757adbb into master May 29, 2026
@PurHur PurHur deleted the agent/issue-3037-parse-failure-diagnostics branch May 29, 2026 13:36
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.

Self-host M5: native vendor invoker should surface parseAndCompile failure text (not silent null)

1 participant