@@ -28,7 +28,7 @@ import (
28
28
"sync"
29
29
"time"
30
30
31
- rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/settings /v1"
31
+ rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands /v1"
32
32
"github.com/arduino/arduino-language-server/globals"
33
33
"github.com/arduino/arduino-language-server/sourcemapper"
34
34
"github.com/arduino/arduino-language-server/streams"
@@ -40,6 +40,7 @@ import (
40
40
"go.bug.st/lsp/jsonrpc"
41
41
"go.bug.st/lsp/textedits"
42
42
"google.golang.org/grpc"
43
+ "google.golang.org/grpc/credentials/insecure"
43
44
)
44
45
45
46
// INOLanguageServer is a JSON-RPC handler that delegates messages to clangd.
@@ -1430,14 +1431,17 @@ func (ls *INOLanguageServer) extractDataFolderFromArduinoCLI(logger jsonrpc.Func
1430
1431
var dataDir string
1431
1432
if ls .config .CliPath == nil {
1432
1433
// Establish a connection with the arduino-cli gRPC server
1433
- conn , err := grpc .Dial (ls .config .CliDaemonAddress , grpc .WithInsecure (), grpc .WithBlock ())
1434
+ conn , err := grpc .Dial (
1435
+ ls .config .CliDaemonAddress ,
1436
+ grpc .WithTransportCredentials (insecure .NewCredentials ()),
1437
+ grpc .WithBlock ())
1434
1438
if err != nil {
1435
1439
return nil , fmt .Errorf ("error connecting to arduino-cli rpc server: %w" , err )
1436
1440
}
1437
1441
defer conn .Close ()
1438
- client := rpc .NewSettingsServiceClient (conn )
1442
+ client := rpc .NewArduinoCoreServiceClient (conn )
1439
1443
1440
- resp , err := client .GetValue (context .Background (), & rpc.GetValueRequest {
1444
+ resp , err := client .SettingsGetValue (context .Background (), & rpc.SettingsGetValueRequest {
1441
1445
Key : "directories.data" ,
1442
1446
})
1443
1447
if err != nil {
0 commit comments