Skip to content

Platform installation only offered if port is selected #854

Closed
@per1234

Description

@per1234

Describe the bug

The "Select Board" dialog of the Arduino IDE lists boards from two sources:

  • Installed boards platforms (same as Tools > Board menu)
  • Boards from platforms which are not installed, but available for installation via the primary package index and any other package indexes the user has configured via the "Additional Boards Manager URLs" preference.

When a board from the latter source is selected, Arduino IDE offers to install the board's platform.

🐛 The installation offer is not made if a port has not been selected by the user.

Not all boards use a port, either because they are a pure HID device (e.g., Digispark), or because they are programmed via an ISP programmer.

The user may also wish simply to compile for a board. In this use case there is no need to have the hardware attached to the computer.

For these reasons, it is not appropriate to impose an arbitrary requirement that a port be selected. The port selection is not in any way necessary for the IDE to identify the necessary platform.

To Reproduce

  1. Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE menus if it is running.

  2. Replace the bundled Arduino CLI binary from the Arduino IDE installation:

    resources/app/node_modules/arduino-ide-extension/build/
    

    with the version that has the new fuzzy search system (e404a3ba1012c39b8ef18de0e658f1cb3917fea9 or later):
    https://github.com/arduino/arduino-cli/actions/runs/3143931031

  3. Rename or delete the following folder to trigger the first run installations:
    ( this is done as a reliable way to achieve the state of having no port selected)

    • Windows:
      C:\Users\<username>\AppData\Roaming\arduino-ide\
      
      (where <username> is your Windows username)
      ❗ If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
    • Linux:
      /home/<username>/.config/arduino-ide/
      
      (where <username> is your Linux username)
      ❗ The .config folder may be hidden by default in your file manager and terminal.
    • macOS:
      /Users/<username>/Library/Application Support/arduino-ide/
      
      (where <username> is your macOS username)
      ❗ The Library folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.

    ⚠ Please be very careful when deleting things from your computer. When in doubt, back up!

  4. Start Arduino IDE.

  5. Open the "Board Selector".

  6. Click on "Select other board and port...".

  7. From the "BOARDS" menu, select any board name that has a gray color (the color indicates the platform is not installed.
    ❗ Do not select a port from the "PORTS" menu.

  8. Click the OK button.
    🐛 The IDE does not offer to install the missing platform.

  9. Open the "Board Selector".

  10. Click on "Select other board and port...".

  11. Select any port from the "PORTS" menu.
    🛈 It doesn't matter what is producing the port. There is no need to have the actual board connected to your computer.

  12. Click the OK button.

🙂 The IDE offers to install the missing platform:

image

Expected behavior

Offer to install the platform whenever a board of a platform that is not currently installed is selected via the "Select Board" dialog.

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc4-snapshot-2bfc434
    Date: 2022-02-22T10:25:20.375Z
    CLI Version: 0.21.0 [10107d24]

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions