Skip to content

Commit 960d8db

Browse files
author
Akos Kitta
committed
removed that uses a more recent version of the CLI from the PATH
from now on, we always use the one from the IDE. Documented how to replace it on demand. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent 17de5e1 commit 960d8db

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

Diff for: README.md

+11
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ This project is built on [GitHub Actions](https://github.com/bcmi-labs/arduino-e
8383
git push origin 1.2.3
8484
```
8585

86+
### FAQ
87+
88+
- Q: Can I manually change the version of the [`arduino-cli`](https://github.com/arduino/arduino-cli/) used by the IDE?
89+
- A: Yes. It is possible but not recommended. The CLI exposes a set of functionality via [gRPC](https://github.com/arduino/arduino-cli/tree/master/rpc) and the IDE uses this API to communicate with the CLI. Before we build a new version of IDE, we pin a specific version of CLI and use the corresponding `proto` files to generate TypeScript modules for gRPC. This means, a particular version of IDE is compliant only with the pinned version of CLI. Mismatching IDE and CLI versions might not be able to communicate with each other. This could cause unpredictable IDE behavior.
90+
91+
- Q: I have understood that not all versions of the CLI is compatible with my version of IDE but how can I manually update the `arduino-cli` inside the IDE?
92+
- A: [Get](https://arduino.github.io/arduino-cli/installation) the desired version of `arduino-cli` for your platform and manually replace the one inside the IDE. The CLI can be found inside the IDE at:
93+
- Windows: `C:\path\to\Arduino Pro IDE\resources\app\node_modules\arduino-ide-extension\build\arduino-cli.exe`,
94+
- macOS: `/path/to/Arduino Pro IDE.app/Contents/Resources/app/node_modules/arduino-ide-extension/build/arduino-cli`, and
95+
- Linux: `/path/to/Arduino Pro IDE/resources/app/node_modules/arduino-ide-extension/build/arduino-cli`.
96+
8697
### Architecture overview
8798

8899
The Pro IDE consists of three major parts:

Diff for: arduino-ide-extension/src/node/arduino-daemon-impl.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class ArduinoDaemonImpl implements ArduinoDaemon, BackendApplicationContr
133133
if (this._execPath) {
134134
return this._execPath;
135135
}
136-
this._execPath = await getExecPath('arduino-cli', this.onError.bind(this), 'version');
136+
this._execPath = await getExecPath('arduino-cli', this.onError.bind(this));
137137
return this._execPath;
138138
}
139139

Diff for: arduino-ide-extension/src/node/language/arduino-language-server-contribution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class ArduinoLanguageServerContribution extends BaseLanguageServerContrib
3030
const [languageServer, clangd, cli] = await Promise.all([
3131
getExecPath('arduino-language-server', this.onError.bind(this)),
3232
getExecPath('clangd', this.onError.bind(this), '--version', os.platform() !== 'win32'),
33-
getExecPath('arduino-cli', this.onError.bind(this), 'version')
33+
getExecPath('arduino-cli', this.onError.bind(this))
3434
]);
3535
// Add '-log' argument to enable logging to files
3636
const args: string[] = ['-clangd', clangd, '-cli', cli];

0 commit comments

Comments
 (0)