Add first set of profile commands by MatteoPologruto · Pull Request #2917 · arduino/arduino-cli (original) (raw)

I feel that the design of the profile dump command is inappropriate. This command is actually printing the data of the entire sketch project file, not the build profile data alone. Although the primary usage of the sketch project file is currently for defining build profiles, it is not limited to this purpose and there is a good chance that it will be used for additional things unrelated to build profiles as time goes on.

The profile dump command should be a tool for printing the data from a build profile.

If you want a tool for printing the sketch project file, that should go somewhere else, such as under the sketch command (e.g., sketch project dump), not under the profile command.

If the user doesn't specify a profile ID, it should print the default build profile from the sketch project file. An --all flag could be added to cause it to print all build profiles present in the sketch project file.