Platform installation only offered if port is selected #854
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the bug
The "Select Board" dialog of the Arduino IDE lists boards from two sources:
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
Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE menus if it is running.
Replace the bundled Arduino CLI binary from the Arduino IDE installation:
with the version that has the new fuzzy search system (e404a3ba1012c39b8ef18de0e658f1cb3917fea9 or later):
https://github.com/arduino/arduino-cli/actions/runs/3143931031
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)
<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".<username>
is your Linux username)❗ The
.config
folder may be hidden by default in your file manager and terminal.<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!
Start Arduino IDE.
Open the "Board Selector".
Click on "Select other board and port...".
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.
Click the OK button.
🐛 The IDE does not offer to install the missing platform.
Open the "Board Selector".
Click on "Select other board and port...".
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.
Click the OK button.
🙂 The IDE offers to install the missing platform:
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
Date: 2022-02-22T10:25:20.375Z
CLI Version: 0.21.0 [10107d24]
The text was updated successfully, but these errors were encountered: