slint-ui/slint · error

demos.json is incomplete, these boards failed to build

Error message

demos.json is incomplete, these boards failed to build: ${failed}

What it means

main in scripts/build-demo-images.py aggregates failed board features across all build stages. After emitting demos.json, if any boards failed it warns 'demos.json is incomplete, these boards failed to build: <list>' and returns exit code 1. The file is still written with whatever succeeded, so consumers can see it is partial; the non-zero exit lets CI mark the run failed.

Solutions

  1. Scroll up for the per-board failure warnings (266/268 style) and fix each underlying build error, then re-run
  2. Re-run only the failed boards (e.g. with --only) once fixed
  3. In CI, treat the exit code 1 as failed and block publishing demos.json
  4. If a board is permanently unsupported in your environment, remove/narrow it from the board list
Defensive patterns

Strategy: validation

Validate before calling

if failed:
    raise SystemExit(f"refusing to publish demos.json; failed boards: {failed}")

Prevention

When it happens

Trigger: One or more board builds failed earlier in the run (build_mcu or build_p4 recorded failures) — e.g. a cargo compile error for a board target or an idf.py failure — and the script reached the end of main with a non-empty failed list.

Common situations: CI runs where one embedded target fails while others pass, producing partial demos.json artifacts; local partial builds accepted knowingly; flaky flashing tool causing intermittent board failures.

Related errors


AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16). Data as JSON: /api/errors/531069107a2d5185. Report an issue: GitHub.

Appendix: source

Thrown at scripts/build-demo-images.py:410

    with_mcu, with_p4 = args.only != "p4", args.only != "mcu"
    if args.only == "p4" and not shutil.which("idf.py"):
        sys.exit("aborting: --only p4 needs idf.py from a full ESP-IDF >= 6.0 env")
    check_tools(BOARDS if with_mcu else [])

    shutil.rmtree(out, ignore_errors=True)
    out.mkdir(parents=True)

    records: list[dict] = []
    failed: list[str] = []
    for enabled, build in ((with_mcu, build_mcu), (with_p4, build_p4)):
        if enabled:
            built, errors = build(out)
            records += built
            failed += errors

    emit_demos_json(out, base, records)
    if failed:
        warn(
            f"demos.json is incomplete, these boards failed to build: {', '.join(failed)}"
        )
        return 1
    log(f"done, images + demos.json in {out}")
    return 0


if __name__ == "__main__":
    sys.exit(main())

View on GitHub (pinned to bb937076de)