This is a great extension, thanks for making it! I see that it requires the Arduino IDE be installed for one to be able to use it. Arduino recently (about a year ago) started working on arduino-cli which is a CLI for Arduino (duh) and I am wondering if you guys have this on your radar and maybe are thinking about using it as a "backend" for this extension instead of the Arduino IDE?
It is still alpha quality but when it's more stable it might make sense. Or maybe it could be offered as an option, an alternative to installing the Arduino IDE?
Some extensions (like the C++ one or the C# one with OmniShrap) already offer to download their prerequisites by themselves so that the user doesn't need to install anything and I am curious if it would make sense for this one to offer to download the Arduino CLI for the user so the only thing to do as a user would be to install this VS Code extension and connect the board, the rest taken care of.
Of course it would probably also be possible to offer automated download of the Arduino IDE, it looks like it has a silent mode installer: https://forum.arduino.cc/index.php?topic=582294.0. However, I still think supporting the Arduino CLI at least as an alternative makes a lot of sense, because it is lighter and doesn't bundle stuff people might potentially not use (like the whole IDE bit).
Will be happy to hear your thoughts on this!
Came here to leave a similar message, but you beat me to it.
@ArthurMa1978
Any news on this topic?
Some references:
Agree on this.
This would also enable the possibility to create VS Code tasks, to make simple preprocessing of Arduino code, like moving files around before compiling.
there is also the "arduino builder" which appears to have been a similar concept to the "arduino cli" I don't know which is better or what the specific differences are just thought I would mention it just in case...
This also has the benefit of the screen not switching to the Arduino IDE every time I verify or upload. I use full-screen apps a lot (Mac) and once it switches over to whichever screen has the IDE, it doesn't go back (that part is an OS thing, but is an annoying side effect of using the Arduino IDE vs CLI).
@a7hybnj2 It looks like the Arduino Builder is actually based on invoking the Arduino CLI, at least that what I get from a quick read of its source code. It imports it as a module dependency and I think it invokes it for the compilation, although I don't know much about Go so I might be misunderstanding. What's also interesting though is that it is apparently bundled with the Arduino IDE and if it indeed uses the CLI that might mean the CLI is also bundled with the IDE? I have no computer with the IDE at hand right now to check.
If that's true and both the Builder and the CLI come with the IDE, it makes even more sense to offer either as an alternative to the IDE in this extension as it would not present any new prerequisites, people would be required to just have the IDE as they do currently. Still, it would be extra cool if one didn't have to have the IDE if they don't intend to use it and could just have the extension automatically install the CLI by itself, but even not having to install anything extra on top of the IDE is a good argument for adding the CLI option as it won't present new prerequisites aside from the already existing ones.
Guys, please like and comment this PR to fix this once and for all.
https://github.com/microsoft/vscode-arduino/pull/1017
Most helpful comment
Came here to leave a similar message, but you beat me to it.