Skip to content
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

CONSIDER having attach-and-watch install platforms if needed #62

Open
egnor opened this issue Jul 6, 2021 · 3 comments
Open

CONSIDER having attach-and-watch install platforms if needed #62

egnor opened this issue Jul 6, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@egnor
Copy link

egnor commented Jul 6, 2021

Running ardi attach-and-watch seems to install libraries if needed, but if a platform isn't installed, there's an error:

$ ~/go/bin/ardi attach-and-watch cap1188_mega
ardi    Compiling...                                  fqbn="arduino:avr:mega" sketch=cap1188_tester.ino
Downloading missing tool builtin:[email protected]...
builtin:[email protected] downloaded                                                                                       
Installing builtin:[email protected]...
builtin:[email protected] installed
Downloading missing tool builtin:[email protected]...
builtin:[email protected] downloaded                                                                                    
Installing builtin:[email protected]...
builtin:[email protected] installed
Updating index: library_index.json downloaded                                                                                
Updating index: package_index.json downloaded                                                                                
Updating index: package_index.json.sig downloaded                                                                            
Error: platform not installed
Usage:
  ardi attach-and-watch [sketch|build] [flags]

Flags:
  -p, --build-prop stringArray   Specify build property to compiler
  -f, --fqbn string              Specify fully qualified board name
  -h, --help                     help for attach-and-watch
      --port string              The port your arduino board is connected to

Global Flags:
  -q, --quiet     Silence all logs
  -v, --verbose   Print all logs

ardi   Command failed                                error="platform not installed"

Of course this is trivially remedied with a run of ardi install but it would be nifty for attach-and-watch to just Do The Sensible Thing on a machine that hadn't previously been install-ed.

(Of course, it should avoid pinging the network if things are installed, because it might be used offline.)

@robgonnella
Copy link
Owner

In this case what you are seeing being auto-installed are the just the internal tools arduino-cli uses for auto-discovery, and the index files for platforms and libraries. This is out of the control of ardi as it's managed by arduino-cli; however, I've noticed that arduino-cli does not re-download the tools if they already exist in the data directory. As for user defined project platforms and libraries, I'd rather keep it simple for now and let the user run install when needed. I'll keep this issue open though as I may revisit this later.

@robgonnella robgonnella added the enhancement New feature or request label Jul 11, 2021
@egnor
Copy link
Author

egnor commented Jul 11, 2021 via email

@robgonnella
Copy link
Owner

Ha!! I bet that got a look or two from flight attendants! ✈️ 🤖 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants