Platform versions incompatible with host architecture are offered unnecessarily #1889
Closed
3 tasks done
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Milestone
Describe the problem
Although board platforms are not host architecture-specific, their tool dependencies must be built for each target host architecture.
The available archives for a given tool release are listed in
packages[*].tools[*].systems[]
field of the packager's package index file, with the target host architecture specified by the archive object'shost
field.This information is used by the
arduino-cli core
commands to install tool dependencies along with a board platform. In the event a tool dependency is not available for the host architecture, the platform installation fails with an error message in the form:🐛 Platform releases which are incompatible with the user's host architecture are offered for installation and update even though the process will inevitably fail. Previous releases which are compatible are not directly offered.
To reproduce
Set up
I have prepared a package index file which contains two platform releases:
foo_vendor:[email protected]
- has a dependency on thefoo_vendor:[email protected]
tool, which is available for your host architecturefoo_vendor:[email protected]
- has a dependency on thefoo_vendor:[email protected]
tool, which is not available for your host architecturepackage_1888_index.json.txt
package_1888_index.json
board_manager.additional_urls
configuration:<download path>
is the path of thepackage_1888_index.json
file you downloaded in the first step)Steps
foo_vendor:[email protected]
is not compatible with your host architecture:Expected behavior
The current behavior of failing the platform installation with an error is reasonable in the following cases:
Arduino CLI version
5730e2e
Operating system
Windows
Operating system version
10
Additional context
Originally reported by @PaulStoffregen at https://forum.pjrc.com/threads/53548-Arduino-CLI-And-IDE-now-Released-Teensy-Supported!?p=313206#post313206
This subject was previously discussed at #1626, but that discussion centered around the error message more clearly communicating about the problem to the user, while this issue is about Arduino CLI avoiding the error altogether when that is possible.
Issue checklist
The text was updated successfully, but these errors were encountered: