Skip to content

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

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
3 tasks done
egnor opened this issue May 13, 2024 · 2 comments
Closed
3 tasks done

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

egnor opened this issue May 13, 2024 · 2 comments
Assignees
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@egnor
Copy link

egnor commented May 13, 2024

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: 95cfd65 Date: 2024-02-19T13:24:24Z

Operating system

Linux

Operating system version

Ubuntu 24.04

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@egnor egnor added the type: enhancement Proposed improvement label May 13, 2024
@per1234 per1234 added the topic: code Related to content of the project itself label May 14, 2024
@alessio-perugini alessio-perugini added this to the Arduino CLI 1.0.1 milestone May 14, 2024
@cmaglie
Copy link
Member

cmaglie commented Oct 22, 2024

@egnor Do you have an example that shows the problem? the upload command has a flag to specify the profile to use:

  -m, --profile string                Sketch profile to use

Similarly, arduino-cli board list won't detect boards unless the core has been installed.

Uhm, that's a bit convoluted use case, let's suppose that we already have a -m profile flag in board list command: what should be the expected result, for example, if we use a profile that uses the arduino:avr platform? board list -m profile_avr should detect only the boards listed in the AVR platform and display the others as unknown?

@egnor
Copy link
Author

egnor commented Oct 22, 2024

For upload, I think this actually got fixed at some point? I've been using the flag for a while now, and hadn't realized the bug hadn't been tagged. Maybe just as a part of some refactor?

Let's close this bug; the board list case is kind of its own complicated situation with other bugs talking about it.

@egnor egnor closed this as completed Oct 22, 2024
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

4 participants