feat: use Arduino CLI 0.36.0-rc.1 APIs

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2024-01-17 17:16:00 +01:00
committed by Akos Kitta
parent 48e7bf6b5d
commit 8e09971078
43 changed files with 5314 additions and 3052 deletions

View File

@@ -196,11 +196,7 @@ export class InoLanguage extends SketchContribution {
forceStart = false
): Promise<void> {
const port = await this.daemon.tryGetPort();
if (!port) {
return;
}
const portNumber = Number.parseInt(port, 10); // TODO: IDE2 APIs should provide a number and not string
if (Number.isNaN(portNumber)) {
if (typeof port !== 'number') {
return;
}
const release = await this.languageServerStartMutex.acquire();
@@ -280,7 +276,7 @@ export class InoLanguage extends SketchContribution {
lsPath,
daemonAddress: {
hostname: 'localhost',
port: portNumber,
port,
instance: 1, // TODO: get it from the backend
},
clangdPath,