Skip to content

Issue with platform tool dependency resolving #915

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

Closed
timonsku opened this issue Aug 21, 2020 · 4 comments · Fixed by #1887
Closed

Issue with platform tool dependency resolving #915

timonsku opened this issue Aug 21, 2020 · 4 comments · Fixed by #1887
Assignees
Labels
type: imperfection Perceived defect in any part of project

Comments

@timonsku
Copy link

This relates to this issue adafruit/ArduinoCore-samd#142
As described in the issue above I had the case where I had to first install the SAMD core provided by Arduino before I got all the necessary tools like bossac installed. Just installing the Adafruit core, even though it defines the same packages (but no download URL because it references the tools provided by Arduino). This behaviour suggest that the IDE did not check the available packages to install bossac but failed to find the defined source.

Which brings me to the question whether or not tool dependency resolving only happens via already installed packages or if it is supposed to look into all the packages available for download to look for all needed tools (e.g. include all the tools defined by official Arduino board packages and everything included via board manager URLs).
The specs here are unclear about the exact behaviour: https://arduino.github.io/arduino-cli/package_index_json-specification/

I have seen this behaviour on all supported platforms.

@ubidefeo
Copy link

hi @PTS93
we'll look into it at next review, thank you for pointing this out

@per1234
Copy link
Contributor

per1234 commented Oct 11, 2020

Hi @PTS93. I've tried to investigate this issue, but have not been able to reproduce it. Would you mind providing me with a specific set of steps I can follow to reproduce it? If you're using Arduino CLI, you can just give me the arduino-cli commands.

Which brings me to the question whether or not tool dependency resolving only happens via already installed packages or if it is supposed to look into all the packages available for download to look for all needed tools (e.g. include all the tools defined by official Arduino board packages and everything included via board manager URLs).

The latter. When you install a boards core via Boards Manager (or arduino-cli core install), the defined tool dependencies are installed along with the boards core if they are not already installed. So as long as all necessary tool dependencies are defined in the core's package index file (which Adafruit has done correctly), all tools should be installed, regardless of whether any other board cores are installed.

The specs here are unclear about the exact behaviour: https://arduino.github.io/arduino-cli/package_index_json-specification/

That link provides an outdated version of the documentation. Some small improvements have been made to clarify the workings of the tool dependency system in the package_index.json specification since that time. We do have one or two more improvements in this area on our "to-do" list, but if you check the up to date version of the documentation and have any specific suggestions for improvement, they would be very welcome:
https://arduino.github.io/arduino-cli/dev/package_index_json-specification/

@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Oct 11, 2020
@timonsku
Copy link
Author

Hi @per1234 . Unfortunately I had the same issue. It was happening very randomly and sometimes months apart.
So I have no specific instructions to reproduce it but it mostly happened on a fresh install of the IDE and the only thing being downloaded was the Adafruit SAMD core.

Could it be that the install will proceed even if some of the tools weren't able to download (e.g. connection timeout during download, permission error during extraction etc..) and all I witnessed was the IDE trying again when I simply choose a different core with the same dependencies? Thats where I would personally start looking into how the IDE behaves when something unexpected happens like a connection timeout. How much does it guarantee that the install went ok and if it knowingly errors out, how clearly does it communicate to the user? Does it revert any changes of a partial install?

@per1234 per1234 removed the status: waiting for information More information must be provided before work can proceed label Oct 11, 2020
@per1234 per1234 reopened this Mar 30, 2021
@fstasi fstasi removed the type: bug label Sep 16, 2021
@rsora rsora added type: imperfection Perceived defect in any part of project topic: core labels Sep 22, 2021
@per1234 per1234 changed the title Issue with dependency resolving. Issue with platform tool dependency resolving Feb 21, 2022
@cmaglie
Copy link
Member

cmaglie commented Nov 24, 2022

This should be solved by #1887 which add specification on how tool selection should behave in all cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants