arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.33k stars 374 forks source link

feat: reference sketch.yaml platforms for "upload", "board list", etc. #2602

Open egnor opened 4 months ago

egnor commented 4 months ago

Describe the request

The sketch project file sketch.yaml is wonderful for making more self contained projects that don't include the dreaded "okay now here follow these 20 steps to Set Up Your Machine, by the way they're out of date" disease. (Version managers like asdf or mise are another part of the solution.)

BUT it only really has much effect for arduino-cli compile. When for example doing arduino-cli upload, if the core in question hasn't been installed with arduino-cli core install, the upload will often fail. Similarly, arduino-cli board list won't detect boards unless the core has been installed.

The upload command does parse sketch.yaml to find attachment information, so, there's some precedent for looking for one...

Describe the current behavior

A core that is referenced in sketch.yaml but not globally installed on the system doesn't inform arduino-cli upload or arduino-cli board list commands.

Arduino CLI version

arduino-cli Version: 0.35.3 Commit: 95cfd654 Date: 2024-02-19T13:24:24Z

Operating system

Linux

Operating system version

Ubuntu 24.04

Additional context

No response

Issue checklist