Context
NightDriverStrip env:demo sets build_src_flags = ... -DPROJECT_NAME="\"Demo\"" (standard PlatformIO idiom for a string-valued define — SCons passes flags through a shell layer, so gcc receives the argv element -DPROJECT_NAME="Demo").
Under fbuild (Rust, ESP32 orchestrator, compile-sketch phase), every use of PROJECT_NAME fails with:
<command-line>: error: unable to find string literal operator 'operator""Demo' with 'const char [1]', 'unsigned int' arguments
src/effectmanager_persistence.cpp:262:31: note: in expansion of macro 'PROJECT_NAME'
i.e. the macro value reaching gcc is ""Demo""-shaped — backslashes stripped, literal quotes kept. fbuild-config's parse_flags preserves the token verbatim, so the corruption happens downstream in flag re-tokenization (fbuild_core::shell_split::split deliberately treats \ as literal and strips quote chars — correct for Windows paths, wrong for escaped-quote defines) or in the compile-command assembly.
Reproduced in the #942 Docker profiling harness: cold fbuild build /tmp/nds -e demo (NightDriverStrip @ 5911331) fails after ~11.5 min in compile-sketch. This blocks the #942 Phase 1 baseline (and any real project using string-valued defines, which is a very common PlatformIO pattern).
Acceptance criteria
Decisions
- Severity: HIGH — user-facing build failure on a very common flag idiom.
- Fix shape: make the flag tokenizer shell-unescape
\" inside double-quoted regions (or bypass re-tokenization for already-tokenized flags) while keeping backslashes literal outside quotes so Windows paths stay safe. Exact location pending trace.
Part of #942 (blocks Phase 1 baseline).
Context
NightDriverStrip
env:demosetsbuild_src_flags = ... -DPROJECT_NAME="\"Demo\""(standard PlatformIO idiom for a string-valued define — SCons passes flags through a shell layer, so gcc receives the argv element-DPROJECT_NAME="Demo").Under fbuild (Rust, ESP32 orchestrator,
compile-sketchphase), every use ofPROJECT_NAMEfails with:i.e. the macro value reaching gcc is
""Demo""-shaped — backslashes stripped, literal quotes kept.fbuild-config'sparse_flagspreserves the token verbatim, so the corruption happens downstream in flag re-tokenization (fbuild_core::shell_split::splitdeliberately treats\as literal and strips quote chars — correct for Windows paths, wrong for escaped-quote defines) or in the compile-command assembly.Reproduced in the #942 Docker profiling harness: cold
fbuild build /tmp/nds -e demo(NightDriverStrip @5911331) fails after ~11.5 min incompile-sketch. This blocks the #942 Phase 1 baseline (and any real project using string-valued defines, which is a very common PlatformIO pattern).Acceptance criteria
-DNAME="\"Value\""inbuild_flags/build_src_flagsreaches the compiler as the argv element-DNAME="Value"(direct-exec semantics), on the ESP32 path at minimum.esp8266,rp2040,stm32) use ofshell_splitfor the same hazard — fix or file follow-ups.env:democompiles pasteffectmanager_persistence.cppin the meta: profiling-driven build performance burndown (Docker Linux, NightDriverStrip, cold vs hot cache) #942 harness.Decisions
\"inside double-quoted regions (or bypass re-tokenization for already-tokenized flags) while keeping backslashes literal outside quotes so Windows paths stay safe. Exact location pending trace.Part of #942 (blocks Phase 1 baseline).