Repository navigation
[README/EXITCODE] Exit with an error code on failed builds, document the CLI in the README - #306
Merged
Merged
Conversation
…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>
|
Fyi, implemented the same change but for tests in #289. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
finn buildandfinn autoalways exited with code 0, because_buildignored the return value ofbuild_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._buildnow prints the path to the build log and exits with 1 when the build fails.The README only showed
finn deps updateandfinn 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 offinn settings createreferred tofinn wizard config, which does not exist; it now namesfinn wizard settings.