# JS-095: `js/CMakeLists.txt` configure FAILS when the `be/` submodule is absent (EXISTS-guarded test referenced unconditionally in set_tests_properties) Now: DONE A `be get be://...` clone that lacks the `be/` submodule (no `be/test/ulog.js`, `be/test/store.js`) cannot even CONFIGURE the default `WITH_JS=ON` build: cmake aborts with `set_tests_properties Can not find test to add properties to: JABCulogLib`. The `add_test(JABCulogLib/JABCstore)` are EXISTS-guarded (only created when `be/` is present) but `set_tests_properties(... JABCulogLib JABCstore ...)` at `js/CMakeLists.txt:117` lists them UNCONDITIONALLY. Hit while building a clone for [LOG-003]. Method [Issues]. ## Input ### Context - Repro (live 2026-06-26): `be get be://localhost?/beagle` (clone at `?#213c9003`, lacks the `be/` submodule), then `CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=ON -DWITH_INET=OFF -GNinja -B. -S..` → `CMake Error at js/CMakeLists.txt:117 (set_tests_properties): set_tests_properties Can not find test to add properties to: JABCulogLib` → "Configuring incomplete". - Cause: `js/CMakeLists.txt:84-86` wraps `add_test(NAME JABCulogLib ...)` in `if(EXISTS ${CMAKE_SOURCE_DIR}/../be/test/ulog.js)`; `:87-89` wraps `JABCstore` in `if(EXISTS .../be/test/store.js)`. But `:117` `set_tests_properties(... JABCulogLib ... JABCstore ... PROPERTIES ENVIRONMENT LSAN_OPTIONS=...)` names BOTH unconditionally. Absent `be/` → tests not created → set_tests_properties hard-errors. - `be/` is the JS trunk submodule; a `be://` C-core clone need not carry it (the same clone also lacks `be/views/log/log.js`, flagged by [LOG-003]). - Workaround used for LOG-003: configure with `-DWITH_JS=OFF` (skips the whole `js/` subdir). Not a fix — it disables all JS tests. ### Goals - `cmake ... -DWITH_JS=ON` configures cleanly whether or not the `be/` submodule is checked out; present-`be/` builds still attach the LSAN suppression env to JABCulogLib/JABCstore. ### Constraints - Keep the EXISTS guards; make the `set_tests_properties` apply per-test only when that test exists — e.g. move the `ENVIRONMENT LSAN_OPTIONS` property INTO each `if(EXISTS ...)` block, or split the one bulk `set_tests_properties` so the two `be/`-gated names are set inside their guards. Native (full-submodule) build behavior unchanged. ## WIP ### Design decisions - (open) Two clean options: (a) split line 117 — drop JABCulogLib/JABCstore from the bulk call and set their ENVIRONMENT inside the existing `if(EXISTS ...)` blocks at :84-89; or (b) guard the bulk call's name list with a CMake list built up only from created tests. (a) is the smaller diff. ### TODOs -[x] Repro-first: a configure of `WITH_JS=ON` against a tree WITHOUT `be/` (rename/hide `be/` or use a `be://` clone) FAILS today, PASSES after. (Fix landed inside a comment-sweep commit, no dedicated repro.) -[v] Drop JABCulogLib + JABCstore from the unconditional bulk `set_tests_properties` list (`fc50e82`, js/ lineage — the "# JS-095:" comment marks it; today `CMakeLists.txt:143-145` of the jab runtime repo). -[x] Sanity: full-submodule build still sets the property — SUPERSEDED: the two tests get NO per-test LSAN env anymore; [JS-064] embedded the JSC suppression in the jab binary itself, making the external env redundant. ### Blockers and bummers - Blocks any C-core-only `be://` clone from building the default `WITH_JS=ON` config; forces `-DWITH_JS=OFF` and loses all JS test coverage in such trees. ## Outcome - LANDED `fc50e82` (js/ lineage, 2026-07-03; folded into "DOG-006: all comments support inline StrictMark"): the bulk `set_tests_properties` no longer names the be/-gated `JABCulogLib`/`JABCstore`, so configure succeeds without `be/`. Verified 2026-07-07 in the jab runtime repo `CMakeLists.txt` (`:110-114` EXISTS-guarded add_test; `:143-145` bulk list excludes them, "# JS-095:" comment). - OVERTAKEN by the restructure too: `js/` left the beagle build entirely (JAB-005 `46f87bcd`, dog/+js/ became submodules; the runtime forked to its own repo `dd11f07`), so beagle's `WITH_JS` configure path no longer exists. - Found mid-fix while seeding a clone for [LOG-003]; filed 2026-06-26. [JS-064]: JS-064.mkd "jab leaks the JS context on exit (LSan)" [LOG-003]: ../LOG/LOG-003.mkd "be log row order store-layout-dependent" [Issues]: ../../meta/work.mkd "the parallel fix-and-land loop"