Skip to content

Platform dependencies are not installed automatically when installing a dependent platform #954

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

Open
kittaakos opened this issue Sep 17, 2020 · 0 comments
Assignees
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@kittaakos
Copy link
Contributor

When I install a 3rd party core (adafruit:avr) that depends on an official Arduino core (arduino:avr) and then I try to get the board details of one of the boards (adafruit:avr:adafruit32u4) from the 3rd party core, I get an error:

Error getting board details: loading board data: missing platform release arduino:avr referenced by board adafruit:avr:adafruit32u4

I do not have the official board installed, I have expected it’s being installed automatically when the 3rd party is installed.

Steps to reproduce:

% rm -rf ~/Library/Arduino15 && rm -rf ~/Documents/Arduino/libraries
% ./arduino-cli version
arduino-cli Version: 0.13.0 Commit: 693a045
% ./arduino-cli core update-index --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Downloading missing tool builtin:ctags@5.8-arduino11...
builtin:ctags@5.8-arduino11 downloaded                                                                                                                          
Installing builtin:ctags@5.8-arduino11...
builtin:ctags@5.8-arduino11 installed
Downloading missing tool builtin:serial-discovery@1.0.0...
builtin:serial-discovery@1.0.0 downloaded                                                                                                                       
Installing builtin:serial-discovery@1.0.0...
builtin:serial-discovery@1.0.0 installed
Updating index: library_index.json downloaded                                                                                                                   
Updating index: package_index.json downloaded                                                                                                                   
Updating index: package_index.json.sig downloaded                                                                                                               
Updating index: package_adafruit_index.json downloaded                                                                                                          
Updating index: package_index.json downloaded                                                                                                                   
Updating index: package_index.json.sig downloaded                                                                                                               
Updating index: package_adafruit_index.json downloaded                                                                                                          
% ./arduino-cli core search "adafruit"  --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
ID             Version Name                                        
TeeOnArdu:avr  1.0.3   Adafruit TeeOnArdu                          
adafruit:avr   1.4.13  Adafruit AVR Boards                         
adafruit:nrf52 0.21.0  Adafruit nRF52                              
adafruit:samd  1.6.2   Adafruit SAMD Boards                        
adafruit:wiced 0.6.6   Adafruit WICED                              
arduino:avr    1.8.3   Arduino AVR Boards                          
arduino:samd   1.8.8   Arduino SAMD Boards (32-bits ARM Cortex-M0+)
% ./arduino-cli core install adafruit:avr --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json 
Downloading packages...
adafruit:avr@1.4.13 downloaded                                                                                                                                  
Installing adafruit:avr@1.4.13...
Configuring platform...
adafruit:avr@1.4.13 installed
% ./arduino-cli board listall --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Board Name                          FQBN                           
Adafruit 32u4 Breakout              adafruit:avr:adafruit32u4      
Adafruit Bluefruit Micro            adafruit:avr:bluefruitmicro    
Adafruit Circuit Playground Classic adafruit:avr:circuitplay32u4cat
Adafruit Feather 328P               adafruit:avr:feather328p       
Adafruit Feather 32u4               adafruit:avr:feather32u4       
Adafruit Flora                      adafruit:avr:flora8            
Adafruit Gemma (ATtiny85 @ 8MHz)    adafruit:avr:gemma             
Adafruit ItsyBitsy 32u4 3V 8MHz     adafruit:avr:itsybitsy32u4_3V  
Adafruit ItsyBitsy 32u4 5V 16MHz    adafruit:avr:itsybitsy32u4_5V  
Adafruit Metro                      adafruit:avr:metro             
Adafruit Trinket (ATtiny85 @ 16MHz) adafruit:avr:trinket5          
Adafruit Trinket (ATtiny85 @ 8MHz)  adafruit:avr:trinket3          
Pro Trinket 3V/12MHz (FTDI)         adafruit:avr:protrinket3ftdi   
Pro Trinket 3V/12MHz (USB)          adafruit:avr:protrinket3       
Pro Trinket 5V/16MHz (FTDI)         adafruit:avr:protrinket5ftdi   
Pro Trinket 5V/16MHz (USB)          adafruit:avr:protrinket5       
% ./arduino-cli board details -b adafruit:avr:adafruit32u4 --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Error getting board details: loading board data: missing platform release arduino:avr referenced by board adafruit:avr:adafruit32u4
% 

Remarks from @cmaglie:

there are two problems:

  1. the dependency is not "visible" until the package is installed (because is written inside the boards.txt). To solve this we should add a field in the package_index.json to specify the dependency
  2. the dependency may require a package available from another 3rd party URL, so if we want to install the dependency we may need to be ready to automatically add another 3rd party index to the config

Expected behavior

I do not have to install arduino:avr manually.

Environment

  • CLI version (output of arduino-cli version): arduino-cli Version: 0.13.0 Commit: 693a045
  • OS and platform: macOS Catalina 10.15.6 (19G2021)
@per1234 per1234 reopened this Mar 30, 2021
@per1234 per1234 changed the title Required cores are not installed automatically when installing a 3rd party core Platform dependencies are not installed automatically when installing a dependent platform Nov 8, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

5 participants