Commit 8f7910a
authored
`fbuild test-emu .build/pio/<env>` was failing every ESP32 QEMU CI run
with `fatal error: FastLED.h: No such file or directory` even though
the preceding `ci-compile.py` step had just produced a working firmware
in the same directory.
Root cause: the CLI passes the project path through verbatim. ci-compile.py
sends an *absolute* path (workspace-rooted) so include flags end up absolute,
get stripped to project-relative by `zccache::path_arg_for_compile_cwd`, and
GCC resolves them correctly against `cwd = <project>/`. test-emu passes
the raw `.build/pio/<env>` *relative* string, which propagates straight into
`discover_project_includes` and produces relative include paths like
`-I.build/pio/esp32dev/lib/FastLED`. The zccache normalizer short-circuits
on non-absolute inputs and passes them through unchanged. GCC then resolves
the relative include against the already-project-rooted compile cwd, doubling
the prefix to `<project>/.build/pio/esp32dev/lib/FastLED` — a path that
doesn't exist — and FastLED.h is reported missing.
Fix: promote `project_dir` to an absolute path at the top of
`discover_project_includes` via the existing `absolute_from_cwd` helper
(made `pub` for cross-module use). Every emitted include dir is now
absolute regardless of how the caller spelled the input, so the
normalize→exec chain is stable.
Regression tests cover both absolute and relative `project_dir` inputs
and assert the absolutization invariant. Full fbuild-build test suite:
546/546 passing.
Fixes #303
1 parent 8bfba3b commit 8f7910a
2 files changed
Lines changed: 85 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
9 | 21 | | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
| |||
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
0 commit comments