Skip to content

[README/EXITCODE] Exit with an error code on failed builds, document the CLI in the README - #306

Merged
fpjentzsch merged 1 commit into
devfrom
fix/build_exit_code_and_readme_cli
Nov 6, 2026
Merged

fpjentzsch merged 1 commit into
devfrom
fix/build_exit_code_and_readme_cli

Conversation

@LinusJungemann

Copy link
Copy Markdown
Member

finn build and finn auto always exited with code 0, because _build ignored the return value of build_dataflow_cfg(), which reports failures (user errors, internal errors, failed synthesis, Ctrl+C) as -1. Scripts and schedulers could only detect a failed build from the log or from report/metadata_builder.json. _build now prints the path to the build log and exits with 1 when the build fails.

The README only showed finn deps update and finn build. It now lists the current commands and explains how the configuration, partial builds, the settings file and the Xilinx tools are found. The help text of finn settings create referred to finn wizard config, which does not exist; it now names finn wizard settings.

…he README

`finn build` and `finn auto` always exited with code 0, because `_build`
ignored the return value of `build_dataflow_cfg()`, which reports failures
(user errors, internal errors, failed synthesis, Ctrl+C) as -1. Scripts and
schedulers could only detect a failed build from the log or from
report/metadata_builder.json. `_build` now prints the path to the build log
and exits with 1 when the build fails.

The README only showed `finn deps update` and `finn build`. It now lists the
current commands and explains how the configuration, partial builds, the
settings file and the Xilinx tools are found. The help text of
`finn settings create` referred to `finn wizard config`, which does not
exist; it now names `finn wizard settings`.

Verified with the finn CLI on a one-step flow with a custom step: a failing
step exited with 0 before and with 1 after the change, for both `finn build`
and `finn auto`; a successful step still exits with 0. pre-commit, ruff and
pyright report no findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Linus Jungemann <38974033+LinusJungemann@users.noreply.github.com>
@bwintermann

Copy link
Copy Markdown

Fyi, implemented the same change but for tests in #289.

@fpjentzsch
fpjentzsch merged commit 5f851a5 into dev Nov 6, 2026
5 checks passed
@fpjentzsch
fpjentzsch deleted the fix/build_exit_code_and_readme_cli branch November 6, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants