Skip to content

Possible Fix for Issue 2036 #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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

gneiss15
Copy link

Issue 2036, 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 defined 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"

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

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ß <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Apr 22, 2025

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Günter Neiß <[email protected]>
@gneiss15
Copy link
Author

gneiss15 commented Apr 22, 2025

@per1234
Just one additional remark.
Before I found this "configOptions.sort...", I are confused about the order of the menu entries.
IMHO these should be either "as defined in boards.txt" (as in IDE 1.x) or alphabetical by name.
But it's sorted by the menu-id (label) instead of value.
Using a sort by value will produce a sorted order that is understandable by a human, but if that is what is wanted the documentation has to be adopted for this.

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.

2 participants