-
-
Notifications
You must be signed in to change notification settings - Fork 435
Order custom board option menus as defined in platform configuration #2717
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
Title: Custom board option menus not following the order sent by the cli Fixes "Custom board option menus not following the order inside boards.txt" Line 74-76 of "boards-data-menu-updater.ts": for (const { label, option, values } of configOptions.sort( ConfigOption.LABEL_COMPARATOR )) { New Line 74: for (const { label, option, values } of configOptions ) { IMHO using sort on configOptions will produce the mentioned failure. Simply don't sort and the order will be as in Arduino IDE 1.x (as desfined inside board.txt) I don't have the tools to build and test this change. I use the AppImage "arduino-ide_2.3.6_Linux_64bit.AppImage" Signed-off-by: Günter Neiß <gneiss@web.de>
Signed-off-by: Günter Neiß <gneiss@web.de>
@per1234 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pull request @gneiss15. Unfortunately it doesn't appear to have fixed #2036.
If the change you propose had fixed #2036 then we would expect the custom board options menus to be ordered as they are in the Arduino IDE 1.8.19 Tools menu. For example, with Tools > Board > esp32 > ESP32 Dev Module selected from the Arduino IDE menus:
Note the order of the custom board menus:
- Upload Speed
- CPU Frequency
- Flash Frequency
- ...
However, when I use the tester build and select Tools > Board > esp32 > ESP32 Dev Module, the Tools menu contains:
Note the order of the custom board menus:
- CPU Frequency
- Core Debug Level
- Erase All Flash Before Sketch Upload
- ...
Signed-off-by: Günter Neiß <gneiss@web.de>
Hi @per1234, So now the PR works as he should be. PS.: The checks show some errors. I don’t know how to fix them, because they are not related to my PR |
The use of
sort
onconfigOptions
caused the custom board options menus to be ordered according to the lexicographical order of the machine identifiers of the menus instead of allowing the platform developer to control the order in a manner that will be most friendly for human users (via the ordering in theboards.txt
platform configuration file).Removing the sorting code allows the order to be as intended by the platform developer, and aligns the behavior with that of Arduino IDE 1.x.
Fixes #2036
Reviewer checklist