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

Platform installation only offered if port is selected #854

Closed
per1234 opened this issue Feb 22, 2022 · 2 comments · Fixed by #1130
Closed

Platform installation only offered if port is selected #854

per1234 opened this issue Feb 22, 2022 · 2 comments · Fixed by #1130
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 22, 2022

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]
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 22, 2022
@kittaakos
Copy link
Contributor

kittaakos commented Jun 22, 2022

Breaking: 0f82e91

Please verify why we needed this fix 👆

@per1234
Copy link
Contributor Author

per1234 commented Jun 22, 2022

@kittaakos it was a fix for an issue in the private tracker. I have now published that issue to make the information accessible to all interested parties: #1100

@per1234 per1234 linked a pull request Jul 1, 2022 that will close this issue
4 tasks
davegarthsimpson added a commit that referenced this issue Jul 6, 2022
* ensure desired prompts shown + refactor

* pr review changes
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants