-
Notifications
You must be signed in to change notification settings - Fork 7.7k
west build: display closest matches when an invalid board is given #91110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
FYI #89483 |
|
Thanks, didn't notice that. Compared to the above, this PR has no side effects as it only affects the actual error path via the new command line argument. (In fact, I did fully implement custom sorting in |
I placed a comment here: #89483 (comment) Regarding sorting for builds, then board name sorting could make more sense, but if really expected to help users, then it's seems to be assumed that at least first letters was correctly typed. Boards is a growing list in Zephyr, which is a good thing, but makes printing all boards on invalid boards hard to use. Users often know the vendor of their board, even if they typed the name itself wrong, so I wonder if doing format printing where the vendor is also printed would help users more when trying to find the correct board. For example we could have something like:
or perhaps:
I do agree we need to improve, but not sure just order alphabetically will solve our problems. |
40c5330
to
59b9837
Compare
This commit modifies the 'west build' command to display the closest matching boards when an invalid board is specified, making it easier for users to find a typo in the used board name. The user is also instructed to run 'west boards' if he wants to get the full list of available boards. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
59b9837
to
77950d9
Compare
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
v2, review ready: instead of printing the whole table of supported boards on error, only print a few close matches to the requested one. This replaces the wall of text with actionable options in case of a minimal typo. The user is also instructed to use |
Currently, when an invalid board name is given to
west build
, it prints the full set of available boards, which is a wall of text that gives no immediate help to the user.This PR modifies this behavior so that when an invalid board is specified, the 3 board names that most closely match the input are printed. The user is also instructed to get the full set of boards via
west boards
: