Libraries are not re-scanned prior to install operation when in gRPC daemon mode #1802
Closed
3 tasks done
Labels
conclusion: resolved
Issue was resolved
topic: code
Related to content of the project itself
topic: gRPC
Related to the gRPC interface
type: imperfection
Perceived defect in any part of project
Milestone
Describe the problem
The Arduino CLI daemon scans the installed libraries when a gRPC client instance is initialized. Library installation operations are based on the data from the scan.
The data from this scan will not be accurate if any of the following has occurred after a scan:
cc.arduino.cli.commands.v1.ArduinoCoreService.ZipLibraryInstall
methodcc.arduino.cli.commands.v1.ArduinoCoreService.GitLibraryInstall
methodThe first two are not uncommon for the user to do.
🐛 The result of library installation operations may be incorrect due to the libraries on disk not matching the internal data.
To reproduce
Set up
Demo
Use grpcurl to run the following commands in another terminal:
🐛 The library installation failed incorrectly due to the Arduino CLI gRPC daemon not being aware of the change that occurred externally. It was necessary to reinitialize the instance in order to make it behave correctly.
Expected behavior
Libraries are re-scanned at the start of every library installation operation.
Arduino CLI version
0.25.0-rc1 Commit: 63b53c0
Operating system
Windows
Operating system version
10
Additional context
This is a similar problem to #1755. However, it was not introduced by the commit reported there.
Issue checklist
The text was updated successfully, but these errors were encountered: