Closed
Description
Bug Report
Current behavior
When compiling a sketch with missing libraries using the --format json
flag, the error output is on stderr instead of being in the json output.
Test.ino :
#include "Dummy.h"
void setup() {
}
void loop() {
}
Compiling with the following command :
.\arduino-cli_0.18.0_Windows_64bit\arduino-cli.exe compile --format json --fqbn arduino:avr:mega:cpu=atmega2560 Test
Gives the following output :
stdout
{
"compiler_out": "",
"compiler_err": "",
"builder_result": {
"build_path": "C:\\Users\\gaspa\\AppData\\Local\\Temp\\arduino-sketch-2422F2901866CFBFF08F6C5D307E5DE3"
},
"success": false
}
stderr
C:\Users\gaspa\Downloads\Test\Test.ino:1:10: fatal error: Dummy.h: No such file or directory
#include "Dummy.h"
^~~~~~~~~
compilation terminated.
Expected behavior
The error output should be printed on stdout in the json ouput
i.e:
{
"compiler_out": "",
"compiler_err": "C:\\Users\\gaspa\\Downloads\\Test\\Test.ino:1:10: fatal error: Dummy.h: No such file or directory\r\n#include \"Dummy.h\"\r\n ^~~~~~~~~\r\ncompilation terminated.",
"builder_result": {
"build_path": "C:\\Users\\gaspa\\AppData\\Local\\Temp\\arduino-sketch-2422F2901866CFBFF08F6C5D307E5DE3"
},
"success": false
}
Environment
- CLI version :
arduino-cli.exe alpha Version: 0.18.0 Commit: 46c23166 Date: 2021-03-31T09:42:54Z
- OS and platform: Windows 64bit as well as Linux ARMv6
Additional context
This might be caused by #174
Thanks