Compare commits

...

1 Commits

Author SHA1 Message Date
Claude Bot
1b390a11b0 Fix build dependency ordering for cppbind.ts
Resolves issue #21434 where Bun fails to build the first time because
it tries to generate C++ → Zig bindings before installing @lezer/cpp.

The cppbind.ts script imports @lezer/cpp, but the CMake build system
was running this script before ensuring that the root-level node_modules
was installed.

Changes:
- Add register_bun_install() call for root directory in BuildBun.cmake
- Make bun-cppbind target depend on root node_modules installation
- This ensures @lezer/cpp is available before cppbind.ts runs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 19:00:57 +00:00

View File

@@ -316,6 +316,14 @@ set(BUN_CPP_OUTPUTS
${CODEGEN_PATH}/cpp.zig
)
# Root-level node_modules install needed for @lezer/cpp dependency used by cppbind.ts
register_bun_install(
CWD
${CWD}
NODE_MODULES_VARIABLE
BUN_ROOT_NODE_MODULES
)
register_command(
TARGET
bun-cppbind
@@ -329,6 +337,7 @@ register_command(
SOURCES
${BUN_JAVASCRIPT_CODEGEN_SOURCES}
${BUN_CXX_SOURCES}
${BUN_ROOT_NODE_MODULES}
OUTPUTS
${BUN_CPP_OUTPUTS}
)