{"record":{"id":"774b78994cdf0b20","repo":"slint-ui/slint","slug":"board-feature-failed-e-cmd-exited-with-e-returncode","errorCode":null,"errorMessage":"${board.feature} failed: ${e.cmd} exited with ${e.returncode}","messagePattern":"(.+?) failed: (.+?) exited with (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"scripts/build-demo-images.py","lineNumber":276,"sourceCode":"                \"--chip\",\n                board.chip,\n                \"--flash-size\",\n                \"16mb\",\n                str(elf),\n                str(image),\n            ]\n        )\n\n\ndef build_mcu(out: Path) -> tuple[list[dict], list[str]]:\n    \"\"\"Build every board, keeping going past a failure so one bad board doesn't\n    discard the images that did build.\"\"\"\n    records, failed = [], []\n    for board in BOARDS:\n        try:\n            build_board(board, out)\n        except subprocess.CalledProcessError as e:\n            warn(\n                f\"{board.feature} failed: {' '.join(e.cmd)} exited with {e.returncode}\"\n            )\n            failed.append(board.feature)\n            continue\n        records.append(\n            {\n                \"feature\": board.feature,\n                \"name\": board.name,\n                \"method\": board.method,\n                \"file\": board.image_name,\n                \"chip\": board.chip,\n                \"offset\": \"0x0\" if board.method == \"esp\" else \"\",\n                \"demo\": DEFAULT_DEMO,\n            }\n        )\n    return records, failed\n\n","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/scripts/build-demo-images.py#L258-L294","documentation":"build_mcu iterates all MCU boards, calling build_board for each; if a board's cargo/subprocess build exits with a non-zero status (subprocess.CalledProcessError), it warns '<feature> failed: <cmd> exited with <returncode>', records the feature in the failed list, and continues with the remaining boards. The error reports which command failed and its exit code so partially successful runs still emit the images that did build.","triggerScenarios":"build_board's cargo invocation fails for a specific board — e.g. compilation error for that board's target, missing target/rustup toolchain, failing build.rs, or out-of-sync dependency — raising subprocess.CalledProcessError with check=True.","commonSituations":"rustup target for an embedded triple not installed; code change breaks one board's feature-gated build while others still compile; disk full or toolchain version mismatch on CI.","solutions":["Read the full cargo output above the warning to find the underlying compile/toolchain error and fix it","Install the missing rustup target: rustup target add <triple>","Re-run the script after fixing; failed boards are re-attempted","Temporarily remove the failing board from the run and rebuild the rest"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"for t in {board_targets}; do rustup target list --installed | grep -q \"$t\" || echo \"missing rustup target: $t\"; done","typeGuard":null,"tryCatchPattern":"try:\n    build_board(board, out)\nexcept subprocess.CalledProcessError as e:\n    warn(f\"{board.feature} failed: {' '.join(e.cmd)} exited with {e.returncode}\")\n    failed.append(board.feature)\n    continue","preventionTips":["Pre-install all embedded rustup targets used by BOARDS","Run cargo check per board target before the full image build","Keep the demo sources compiling in CI with feature gates enabled","Capture full subprocess output to a log for debugging failures"],"tags":["build","subprocess","embedded","cargo"],"backgroundTag":"subprocess-nonzero-exit","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}