Skip to content

Track installed cores with a dedicated index file #252

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
masci opened this issue Jun 17, 2019 · 2 comments · Fixed by #998
Closed

Track installed cores with a dedicated index file #252

masci opened this issue Jun 17, 2019 · 2 comments · Fixed by #998
Labels
type: enhancement Proposed improvement

Comments

@masci
Copy link
Contributor

masci commented Jun 17, 2019

Bug Report

This is for a bug afflicting the IDE, see arduino/Arduino#8936 for details. Let's double check how the same issue impacts the CLI and whether the solution being proposed might work here as well.

@masci masci added the bug label Jun 17, 2019
@per1234
Copy link
Contributor

per1234 commented Jun 17, 2019

Using arduino-cli 5cca8e2

Regarding the issue of the installed boards disappearing if the download of their Boards Manager JSON file fails

What I did to test:

  1. Publish a Boards Manager JSON file as a Git Gist.
  2. Install a hardware core from that JSON file using arduino-cli core install.
  3. Delete the Gist to simulate an outage of the JSON file.
  4. arduino-cli core update-index now outputs the following:
    Updating index: package_index.json downloaded                                                                                                                                            
    Updating index: package_index.json downloaded                                                                                                                                            
    Updating index: package_asdf_index.json downloaded                                                                                                                                       
    Error: invalid package index in https://gist.githubusercontent.com/per1234/ac3efc0419d3c3a73c262edb7e350ee7/raw/f90a073a1b24823639f211249c01446e8bce5874/package_asdf_index.json: invalid character ':' after top-level value
    Error updating index
    

After that, package_asdf_index.json is still present in the data folder and arduino-cli core list still shows the hardware core from that JSON file is installed and I'm able to compile for the boards.

So it seems to me that arduino-cli has the correct behavior in this case.

Regarding the issue of the installed boards disappearing if the entry for the installed release is removed from the JSON file

  1. Install the hardware core
  2. Remove the entry for the installed version from the JSON file
  3. arduino-cli core update-index
  4. Verify the updated version of the JSON file with the entry for the installed version of the hardware core removed was downloaded.

After that, arduino-cli core list still shows the hardware core from that JSON file is installed and I'm able to compile for the boards.


Despite these positive findings, @matthijskooijman's idea presented in arduino/Arduino#8936 (comment) of storing the JSON at the time of the board installation is still useful in the event of the JSON file author later removing information relevant to the installation from their file because the toolsDependencies information is needed when checking whether any other core has a dependency on tools that that might be removed during a hardware core uninstallation.

@masci masci changed the title Installed boards disappear when entry is missing from index file Track installed libraries with a dedicated index file Jun 17, 2019
@masci masci added type: enhancement Proposed improvement and removed bug labels Jun 17, 2019
@masci
Copy link
Contributor Author

masci commented Jun 17, 2019

@per1234 thanks for the detailed report, going to turn this issue into a feature request and schedule some work in our backlog to implement the installed.json feature.

@rsora rsora changed the title Track installed libraries with a dedicated index file Track installed cores with a dedicated index file Sep 2, 2019
per1234 added a commit that referenced this issue Aug 9, 2021
…/arduino/go-paths-helper-1.6.1

Bump github.com/arduino/go-paths-helper from 1.4.0 to 1.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants