Skip to content

Support php-wasm-builder output in external worktrees - #107

Draft
seanmorris wants to merge 3 commits into
masterfrom
agent/builder-external-worktrees
Draft

seanmorris wants to merge 3 commits into
masterfrom
agent/builder-external-worktrees

Conversation

@seanmorris

Copy link
Copy Markdown
Owner

What

  • Resolve builder distribution, asset, stdlib, and preload paths against the invoking project.
  • Scaffold the runtime package trees needed when building outside this repository.
  • Expand php-wasm-builder build target parsing across web, node, worker, webview, base, CGI, CLI, and DBG outputs, with conflict validation and propagated Make failures.
  • Expose the selected PHP_VERSION through the Emscripten module environment.
  • Update builder documentation and add focused clean-worktree coverage.

Why

The installed builder runs Make from its own repository while users configure output paths relative to another project. Those two roots were mixed together, which could double-prefix paths, write stdlib and preload output into the builder checkout, or omit the runtime package files an external build needs. The CLI also launched Make asynchronously and accepted ambiguous selectors, hiding failures and target mistakes.

Impact

External projects can build all supported runtime package variants into their own tree, use relative preload and asset paths consistently, and receive the actual Make exit status. This is independent of the Emscripten 6/dynamic-library update in #106 and does not duplicate that patch.

Checks

  • node --test test/builder-help.test.mjs test/builder-worktree.test.mjs test/preload-assets.test.mjs test/runtime-env.test.mjs — 18 passed
  • npm run test:docs — 3 passed, 1 expected skip
  • npm run tsc — passed
  • Node syntax checks for builder, runtime, and docs reports — passed
  • git diff --check — passed

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