Candidate locations where fbuild may have written artifacts. FastLED compiles fbuild with ``build_dir= /.build/pio/ /`` (see ``ci/compiler/pio.py::_artifacts_dir``), so fbuild's output lives at ``.build/pio/ /.fbuild/build/ /release/``. The standalone CLI (``fbu
(
project_root: Path, build_root: Path, board_name: str
)
| 20 | |
| 21 | |
| 22 | def _candidate_fbuild_release_dirs( |
| 23 | project_root: Path, build_root: Path, board_name: str |
| 24 | ) -> list[Path]: |
| 25 | """Candidate locations where fbuild may have written artifacts. |
| 26 | |
| 27 | FastLED compiles fbuild with ``build_dir=<repo>/.build/pio/<board>/`` (see |
| 28 | ``ci/compiler/pio.py::_artifacts_dir``), so fbuild's output lives at |
| 29 | ``.build/pio/<board>/.fbuild/build/<env>/release/``. The standalone CLI |
| 30 | (``fbuild <repo> build --target compiledb``) instead emits |
| 31 | ``<repo>/.fbuild/build/<env>/release/`` — we treat both as valid so that a |
| 32 | direct ``--target compiledb`` invocation (no prior FastLED compile) also |
| 33 | works. An older ``.build/.fbuild/…`` layout is kept as a tail fallback. |
| 34 | |
| 35 | ``project_root`` is passed explicitly rather than derived from |
| 36 | ``build_root.name == ".build"`` — callers always know their repo root |
| 37 | (every call site has ``_PROJECT_ROOT`` or ``project_root`` locally), and |
| 38 | an explicit arg removes the fragile name-based heuristic that silently |
| 39 | collapsed candidates when ``build_root`` wasn't conventionally named. |
| 40 | |
| 41 | Returned in preference order (first hit wins). |
| 42 | """ |
| 43 | return [ |
| 44 | build_root / "pio" / board_name / ".fbuild" / "build" / board_name / "release", |
| 45 | project_root / ".fbuild" / "build" / board_name / "release", |
| 46 | build_root / ".fbuild" / "build" / board_name / "release", |
| 47 | ] |
| 48 | |
| 49 | |
| 50 | def fbuild_release_dir(project_root: Path, build_root: Path, board_name: str) -> Path: |
no outgoing calls
no test coverage detected