Skip to content
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

The board order is not deterministic in core search #2466

Open
3 tasks done
kittaakos opened this issue Dec 14, 2023 · 0 comments
Open
3 tasks done

The board order is not deterministic in core search #2466

kittaakos opened this issue Dec 14, 2023 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

Describe the problem

core search --format json provides different output for the same args. The boards item per platform differs.

To reproduce

./arduino-cli version  
arduino-cli  Version: 0.35.0-rc.7 Commit: 77222ecd Date: 2023-12-04T12:29:09Z
./arduino-cli core list
ID               Installed Latest Name
arduino:avr      1.8.6     1.8.6  Arduino AVR Boards
arduino:esp32    2.0.13    2.0.13 Arduino ESP32 Boards
arduino-git:samd 1.8.13    1.8.13 Arduino SAMD (32-bits ARM Cortex-M0+) Boards
pico:rp2040      3.6.0     3.6.0  Raspberry Pi RP2040 Boards

(prints the name + FQBN of the first boards item of the arduino:avr core):

./arduino-cli core search "arduino:avr" --format json | jq '. | map((.id, .name, .boards[0])) | select(.[0] == "arduino:avr")'
[
  "arduino:avr",
  "Arduino AVR Boards",
  {
    "name": "Arduino BT",
    "fqbn": "arduino:avr:bt"
  }
]

Run the same command twice (or sometimes the third time):

./arduino-cli core search "arduino:avr" --format json | jq '. | map((.id, .name, .boards[0])) | select(.[0] == "arduino:avr")'
[
  "arduino:avr",
  "Arduino AVR Boards",
  {
    "name": "Arduino Robot Motor",
    "fqbn": "arduino:avr:robotMotor"
  }
]

Expected behavior

The core search --format json output is deterministic

Arduino CLI version

0.35.0-rc.7 Commit: 77222ec

Operating system

macOS

Operating system version

14.1

Additional context

I remember we had this problem, which was solved, but I could not find the corresponding issue/PR. Please close if it's a duplicate.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 14, 2023
@cmaglie cmaglie changed the title The board oder is not deterministic in core search The board order is not deterministic in core search Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant