Skip to content

JSON format not working properly with compile command #174

Closed
@Renaud11232

Description

@Renaud11232

When using --format json with the compile command, the output is not properly formatted as JSON in version 0.3.6-alpha.preview

Successful compilation

Running

./arduino-cli compile --fqbn aruino:avr:uno Arduino/Test --format json

Outputs

On stdout

Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

Failed compilation

Running

./arduino-cli compile --fqbn aruino:avr:uno Arduino/Test --format json

Outputs

On stdout

Build options changed, rebuilding all
{"Message":"Compilation failed.","Cause":"exit status 1"}

On stderr

/home/renaud/Arduino/Test/Test.ino: In function 'void setup()':
/home/renaud/Arduino/Test/Test.ino:3:1: error: 'a' was not declared in this scope
 a
 ^

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions