Closed
Description
Describe the request
Implement the "Using a default profile" component of the "Sketch build profiles and reproducible builds" RFC.
Describe the current behavior
The majority of the "Sketch build profiles and reproducible builds" RFC has now been implemented (#1713).
One missing part is the support for the default_profile
key of the sketch project file.
🙁 There is currently no way to define a default profile, to be used when the arduino-cli
command operating on a sketch with build profiles does not contain a --profile
flag.
Arduino CLI version
0.23.0
Operating system
All
Operating system version
N/A
Additional context
Issue checklist
- I searched for previous requests inI verified the feature was still missing when using the latestMy request contains all necessary details
Activity
cmaglie commentedon Jun 14, 2023
Here are some use cases and the expected outcome:
Sketch with the following project file:
Case 1:
Output: error
Missing FQBN (Fully Qualified Board Name)
Case 2:
Output: compile using profile
uno
Case 3:
Output: compile using profile
uno
but overrides FQBN witharduino:avr:leonardo
Case 4:
Output: compile for
arduino:avr:uno
without using the profilesSketch with the following project file:
Case 5:
Output: compiles using the default profile
leonardo
Case 6:
Output: compiles using profile
uno
Case 7:
Output: compile using profile
uno
but overrides FQBN witharduino:avr:leonardo
Case 8:
Output: compile using the default profile
leonardo
but overrides FQBN witharduino:avr:uno
alexxus commentedon Aug 16, 2023
Please implement it. It would be so helpful!
I'm forced to use the
--profile
flag, even if mysketch.yaml
file has only one profile. It doesn't make sense!arduino-cli could simply default to the single profile.
Something like
default_profile: leonardo
, like suggested by @cmaglie, could be also a good alternative. In fact, it would be almost better than the "magical" defaulting to the single profile. In this case the user would tell, which profile has to be used as the default.