fatman: static-link every external module in one host + CI gate - #3351
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a “fatman” smoke test that builds a single daslang host with multiple external modules statically linked, and introduces a dedicated CI workflow to gate the externals’ “superbuild/static-embed” CMake path that their own standalone .shared_module CI doesn’t cover.
Changes:
- Add
examples/fatman/main.daswhichrequires all targeted external modules/boost paths to validate registration + boost-path resolution + static linkage. - Add
.github/workflows/fatman.ymlto clone externals intomodules/, builddaslang, and run the fatman smoke script. - Update
CMakeLists.txtandweb/CMakeLists.txtto tolerate both pre- and post-renamedasImguilayouts forimgui_boost_v2embedding/registration.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
web/CMakeLists.txt |
Conditional embed of imgui_boost fallback to support both dasImgui layouts. |
examples/fatman/main.das |
New smoke script that requires all external modules and one boost path per module. |
CMakeLists.txt |
Conditional ADD_MODULE_DAS registration to avoid double-registering imgui_boost_v2 post-rename. |
.github/workflows/fatman.yml |
New CI workflow that clones externals, builds a “fat” daslang host, and runs the smoke. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: "Run the fat man" | ||
| run: | | ||
| set -eux | ||
| ./build/daslang examples/fatman/main.das |
The test half of the both-worlds sweep (dasVulkan #64, dasImgui #218, dasImguiNodeEditor #35, dasImguiImplot #25): the externals' superbuild (static-embed) branches had no CI coverage anywhere — each module's own CI only builds the standalone .shared_module flavor. - examples/fatman/main.das — requires every external C++ module and one boost path per module: registration + boost-path resolution + the static link, no window, no GPU. The daslang_static host absorbs externals cloned into modules/ automatically (the modules glob includes any CMakeLists without a .daspkg_standalone marker), so the fat man needs no C++ of its own. daslang_static is the flavor that links the static module halves — the DLL-flavor daslang resolves externals via .shared_module at runtime, which cannot exercise the static-embed path at all. - .github/workflows/fatman.yml — clones the four externals at master into modules/, configures with the modules glob absorbing their both-worlds branches, builds daslang_static, runs the smoke. Doubles as the compile-time ABI canary for daslang-vs-externals drift. - include/daScript/simulate/aot.h — das_vector push/erase compared uint32_t(index) > vec.size(): fine for std::vector (size_t) but -Werror=sign-compare on gcc for ImVector (int size()), which nothing had ever instantiated these templates over in a gcc build. Cast both sides (the range-erase overload at :3171 already did). - web/CMakeLists.txt + CMakeLists.txt — the dasImgui imgui_boost_v2 embed mount and NATIVE_MODULE registration now tolerate both dasImgui layouts (pre- and post-#218 rename), unblocking that PR. Validated locally on Windows (VS gen): all four externals junctioned into modules/, configure absorbs them, the fat daslang_static host links all five modules statically and the smoke passes. The gate caught three real defects before ever reaching CI green: dasImguiImplot's registered-name / file-stem mismatch (fixed in #25), the imgui-family ADD_MODULE_LIB shared twins failing to link (static-only sweep: dasImgui#219, implot#26, node-editor#37, vulkan#65), and the duplicate typeFactory<GLFWwindow> strong symbol (guarded in dasImgui#219 — the same collision web/CMakeLists papers over with --allow-multiple-definition). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
include/daScript/simulate/aot.h:3166
- das_vector_erase currently allows index == vec.size() (it checks
>instead of>=), which makesvec.erase(vec.begin() + index)invoke undefined behavior (erasingend()is invalid). The bounds check should reject index >= size (and keep the negative-index guard).
if ( uint32_t(index)>uint32_t(vec.size()) ) { // both sides cast: ImVector::size() is int, std::vector's is size_t
context->throw_error_ex("erasing vector index out of range %i of %i", index, int32_t(vec.size()));
}
if constexpr (das::is_stub_type<QQ>::value) { DAS_ASSERTF(false, "STUB!"); }
else vec.erase(vec.begin() + index);
Comment on lines
+3082
to
3084
| if ( uint32_t(at)>uint32_t(vec.size()) ) { // both sides cast: ImVector::size() is int, std::vector's is size_t | ||
| context->throw_error_ex("insert index out of range, %i of %u", at, uint32_t(vec.size())); | ||
| } |
Comment on lines
+3092
to
3094
| if ( uint32_t(at)>uint32_t(vec.size()) ) { // both sides cast: ImVector::size() is int, std::vector's is size_t | ||
| context->throw_error_ex("insert index out of range, %i of %u", at, uint32_t(vec.size())); | ||
| } |
Comment on lines
+3102
to
3104
| if ( uint32_t(at)>uint32_t(vec.size()) ) { // both sides cast: ImVector::size() is int, std::vector's is size_t | ||
| context->throw_error_ex("insert index out of range, %i of %u", at, uint32_t(vec.size())); | ||
| } |
Comment on lines
+40
to
+48
| sudo apt-get install --no-install-recommends -y \ | ||
| libatomic-ops-dev \ | ||
| libglu1-mesa-dev \ | ||
| mesa-common-dev \ | ||
| libx11-dev \ | ||
| libxrandr-dev \ | ||
| libxcursor-dev \ | ||
| libxinerama-dev \ | ||
| libxi-dev |
borisbat
added a commit
that referenced
this pull request
Jul 2, 2026
…yground + CI lane The wasm counterpart of the fat man (#3351). The playground interpreter (daslang_static) now gets the imgui family (dasImgui + dasImguiImplot + dasImguiNodeEditor) by cloning them into modules/ — the modules glob absorbs their both-worlds CMakeLists (the superbuild-emscripten arm), which registers the C++ modules + imgui/<name> boost paths and compiles + statically links the archives from source. This deletes the entire DAS_WEB_IMGUI_DIR hand-wiring: - root CMakeLists: the EMSCRIPTEN+DAS_WEB_IMGUI_DIR NATIVE_MODULE/ADD_MODULE_CPP block (incl. the imgui_boost_v2 tolerance shim, dead since dasImgui #218) - web/CMakeLists: the prebuilt liblib*.a link block and its -Wl,--allow-multiple-definition (the DAS_IMGUI_APP_EXTERN_GLFW_TYPE_FACTORY guard from dasImgui #219 kills the GLFWwindow typeFactory dupe at source); embeds now EXISTS-gated on the cloned modules, mounted at the paths the superbuild registrations resolve (modules/dasImgui/widgets, implot + node-editor daslib), marker-check mirroring the root glob - pages.yml: step 0 (daspkg install + standalone _wasm_build32mt archive build) becomes clone -> threaded playground build -> rm clones before the wasm64 daspkg release steps (those keep using the externals' STANDALONE emscripten branches, untouched); non-fatal fallback rebuilds plain if an external's master regressed New CI lane .github/workflows/wasmboy.yml (fatman.yml's web sibling): clone the imgui family, emcmake-build the threaded daslang_static, run the require-smoke examples/fatman/wasmboy.das under node via web/test/wasmboy_node.js — registration + boost-path resolution (--embed-file mounts) + the static wasm link, no browser, no GPU. Needs dasImgui's superbuild-emscripten fix (gl3w excluded from the wasm superbuild) merged first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
borisbat
added a commit
that referenced
this pull request
Jul 2, 2026
…yground + CI lane (#3358) The wasm counterpart of the fat man (#3351). The playground interpreter (daslang_static) now gets the imgui family (dasImgui + dasImguiImplot + dasImguiNodeEditor) by cloning them into modules/ — the modules glob absorbs their both-worlds CMakeLists (the superbuild-emscripten arm), which registers the C++ modules + imgui/<name> boost paths and compiles + statically links the archives from source. This deletes the entire DAS_WEB_IMGUI_DIR hand-wiring: - root CMakeLists: the EMSCRIPTEN+DAS_WEB_IMGUI_DIR NATIVE_MODULE/ADD_MODULE_CPP block (incl. the imgui_boost_v2 tolerance shim, dead since dasImgui #218) - web/CMakeLists: the prebuilt liblib*.a link block and its -Wl,--allow-multiple-definition (the DAS_IMGUI_APP_EXTERN_GLFW_TYPE_FACTORY guard from dasImgui #219 kills the GLFWwindow typeFactory dupe at source); embeds now EXISTS-gated on the cloned modules, mounted at the paths the superbuild registrations resolve (modules/dasImgui/widgets, implot + node-editor daslib), marker-check mirroring the root glob - pages.yml: step 0 (daspkg install + standalone _wasm_build32mt archive build) becomes clone -> threaded playground build -> rm clones before the wasm64 daspkg release steps (those keep using the externals' STANDALONE emscripten branches, untouched); non-fatal fallback rebuilds plain if an external's master regressed New CI lane .github/workflows/wasmboy.yml (fatman.yml's web sibling): clone the imgui family, emcmake-build the threaded daslang_static, run the require-smoke examples/fatman/wasmboy.das under node via web/test/wasmboy_node.js — registration + boost-path resolution (--embed-file mounts) + the static wasm link, no browser, no GPU. Needs dasImgui's superbuild-emscripten fix (gl3w excluded from the wasm superbuild) merged first. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
The test half of the both-worlds sweep (borisbat/dasVulkan#64, borisbat/dasImgui#218, borisbat/dasImguiNodeEditor#35, borisbat/dasImguiImplot#25): the externals' superbuild (static-embed) branches had no CI coverage anywhere — each module's own CI only builds the standalone
.shared_moduleflavor.examples/fatman/main.das— requires every external C++ module (imgui, imgui_app, imgui_app_headless, implot, imgui_node_editor, vulkan) plus one boost path per module: registration + boost-path resolution + the static link, no window, no GPU. The daslang host absorbs externals cloned intomodules/automatically (the modules glob includes any CMakeLists without a.daspkg_standalonemarker), so the fat man needs no C++ of its own..github/workflows/fatman.yml— clones the four externals at master intomodules/, configures with the glob absorbing their both-worlds branches, builds thedaslangtarget, runs the smoke. Doubles as the compile-time ABI canary for daslang-vs-externals drift (theabi_break_sweepdiscipline gets a gate).web/CMakeLists.txt+CMakeLists.txt— the dasImguiimgui_boost_v2embed mount andNATIVE_MODULEregistration now tolerate both dasImgui layouts (pre- and post-cmake: msvc: add flag DAS_USE_STATIC_STD_LIBS #218 rename), unblocking that PR. (Follow-up queued: once cmake: msvc: add flag DAS_USE_STATIC_STD_LIBS #218 lands, the wholeDAS_WEB_IMGUI_DIRhand-wiring can collapse onto dasImgui's superbuild-emscripten branch — WSL-verified, separate PR.)Validated locally on Windows (VS gen): all four externals junctioned into
modules/, configure absorbs them, the fatdaslanghost builds, the smoke passes — and its first run caught a real defect (dasImguiImplot registeredimgui_-prefixed module names over unprefixed file stems; fixed by rename, landed in #25). Full preflight green (13 passed / 0 failed) on the rebased branch.🤖 Generated with Claude Code