-
-
Notifications
You must be signed in to change notification settings - Fork 414
Closed
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftopic: gRPCRelated to the gRPC interfaceRelated to the gRPC interfacetype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Milestone
Description
Describe the problem
When I execute a gRPC CompileRequest
, the progress starts twice and completed
is always false
.
To reproduce
my_sketch.ino
:
void setup() {}
void loop() {}
void foo() {}
int foo2 = 1;
Have the following request:
{
"fqbn": "arduino:avr:uno",
"sketchPath": "/Users/XXX/Desktop/dev/__trash/my_sketch",
"instance": {
"id": 1
}
}
You get the following responses:
[
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 0.2232142835855484
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 0.4464285671710968
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 0.6696428656578064
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 0.8928571343421936
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 1.1160714626312256
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 1.3392857313156128
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 1.5625
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 1.7857142686843872
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 2.0089285373687744
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 2.232142925262451
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 2.455357313156128
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 2.6785717010498047
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 3.125
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 6.25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 9.375
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 12.5
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 15.625
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 18.75
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 21.875
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 28.125
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 31.25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 31.25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 34.375
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 37.5
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 40.625
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 40.625
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 43.75
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 46.875
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 50
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 53.125
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 56.25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 59.375
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 62.5
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 65.625
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 68.75
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 71.875
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 75
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 78.125
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 81.25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 84.375
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 87.5
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 90.625
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 93.75
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 96.875
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 100
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 25
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 50
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 75
}
},
{
"outStream": {},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": [],
"progress": {
"name": "",
"message": "",
"completed": false,
"percent": 100
}
},
{
"outStream": {
"type": "Buffer",
"data": [
83,
107,
101,
46,
10
]
},
"errStream": {},
"buildPath": "",
"usedLibraries": [],
"executableSectionsSize": []
},
{
"outStream": {},
"errStream": {},
"buildPath": "/private/var/folders/g0/n_2cw4ds44l2abcv39xrc4340000gp/T/arduino-sketch-XXX",
"usedLibraries": [],
"executableSectionsSize": [
{
"name": "text",
"size": 444,
"maxSize": 32256
},
{
"name": "data",
"size": 9,
"maxSize": 2048
}
],
"boardPlatform": {
"id": "arduino:avr",
"version": "1.8.5",
"installDir": "/Users/XXX/Library/Arduino15/packages/arduino/hardware/avr/1.8.5",
"packageUrl": ""
},
"buildPlatform": {
"id": "arduino:avr",
"version": "1.8.5",
"installDir": "/Users/XXX/Library/Arduino15/packages/arduino/hardware/avr/1.8.5",
"packageUrl": ""
}
}
]
Notes:
- I wrapped all responses into an array for better JSON format.
- I edited the original
data
buffer to have smaller JSON, the build path hash, and the install paths in the output.
Expected behavior
progress#percent
should not reach100
twice. If it can, then they're multiple tasks. Please useTaskProgress#name
andTaskProgress#message
to distinguish.- When a task completes,
completed
istrue
. - A documentation of how the
CompileResponse
properties are set or how the responses are ordered would be helpful. Or useoneof
for the response messages to formally define the API behavior. Thanks!
Arduino CLI version
0.29.0 76251df
Operating system
macOS
Operating system version
11.6.5
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details
Metadata
Metadata
Assignees
Labels
topic: codeRelated to content of the project itselfRelated to content of the project itselftopic: gRPCRelated to the gRPC interfaceRelated to the gRPC interfacetype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project