fix(build): stop disabling the embedded daemon on full-node builds (1.3.0 regression)
The 1.3.0 lite-capability work gated isUsingEmbeddedDaemon() on the compile flag DRAGONX_ENABLE_EMBEDDED_DAEMON (in 1.2.0 it was hardcoded true, so the daemon always launched). The lite branch in CMakeLists set that flag OFF with `CACHE BOOL ... FORCE`, which POISONS the build dir's cache: a later full-node reconfigure of the same dir keeps the forced-OFF value (the full-node branch never re-asserts it), so embeddedDaemonAvailable=false and the wallet extracts dragonxd but never starts it — exactly the reported "unpacks dragonxd.exe but does not start the daemon, manual start works." Note the two gates are independent: the binary is EMBEDDED/extracted via build.sh (HAS_EMBEDDED_DAEMON), while LAUNCHING is gated by DRAGONX_ENABLE_EMBEDDED_DAEMON — so they diverged (extract yes, launch no). The forced cache write was also pointless: makeWalletCapabilities() already forces the embedded-daemon capability off for any lite build via `fullNodeBuild && embeddedDaemonCompiled`, so lite never launches a daemon regardless of the flag. Fix: - CMakeLists: remove the FORCE cache poisoning (the root cause). - build.sh: set DRAGONX_ENABLE_EMBEDDED_DAEMON explicitly per variant (ON for full-node, OFF for lite), mirroring the existing DRAGONX_BUILD_LITE handling, so an already-poisoned build dir is HEALED on the next build rather than silently keeping the stale OFF. Verified: a poisoned Windows cache (=0) flips to =1 on reconfigure; full-node builds define =1, lite =0; tests + hygiene green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,13 @@ set(DRAGONX_LITE_BACKEND_REQUIRED_SYMBOLS
|
||||
if(DRAGONX_BUILD_LITE)
|
||||
set(DRAGONX_APP_NAME "ObsidianDragonLite")
|
||||
set(DRAGONX_BINARY_NAME "ObsidianDragonLite")
|
||||
set(DRAGONX_ENABLE_EMBEDDED_DAEMON OFF CACHE BOOL "Enable embedded dragonxd support" FORCE)
|
||||
# NOTE: do NOT FORCE-write DRAGONX_ENABLE_EMBEDDED_DAEMON=OFF into the cache here. A forced
|
||||
# cache write persists into a later full-node reconfigure of the same build dir and silently
|
||||
# disables the embedded daemon — the binary still embeds/extracts, but isUsingEmbeddedDaemon()
|
||||
# returns false, so it "unpacks dragonxd but never starts" (the 1.3.0 regression). It is also
|
||||
# redundant: makeWalletCapabilities() already forces the embedded-daemon capability off for any
|
||||
# lite build via `fullNodeBuild && embeddedDaemonCompiled`, so lite never launches a daemon
|
||||
# regardless of this flag. build.sh sets the flag explicitly per variant to defeat stale caches.
|
||||
set(DRAGONX_APP_VERSION "${DRAGONX_LITE_VERSION}")
|
||||
set(DRAGONX_APP_VERSION_SUFFIX "${DRAGONX_LITE_VERSION_SUFFIX}")
|
||||
else()
|
||||
|
||||
6
build.sh
6
build.sh
@@ -116,9 +116,15 @@ CMAKE_LITE_ARGS=()
|
||||
if $DO_LITE; then
|
||||
APP_BASENAME="ObsidianDragonLite"
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_BUILD_LITE=ON")
|
||||
# Lite never embeds/launches a daemon; set it explicitly too for cache hygiene.
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_ENABLE_EMBEDDED_DAEMON=OFF")
|
||||
info "Lite mode enabled: building ${APP_BASENAME}"
|
||||
else
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_BUILD_LITE=OFF")
|
||||
# Re-assert the embedded daemon ON for full-node builds, EXPLICITLY, so a build dir whose cache
|
||||
# was poisoned OFF by a prior --lite configure (or any stale value) is healed — otherwise the
|
||||
# full-node app extracts dragonxd but never launches it (isUsingEmbeddedDaemon() == false).
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_ENABLE_EMBEDDED_DAEMON=ON")
|
||||
fi
|
||||
|
||||
# Resolve the release version string for the active variant from CMakeLists.txt (single source of
|
||||
|
||||
Reference in New Issue
Block a user