Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Bundle arduino-cli with extension #1584

Merged
merged 4 commits into from
Feb 8, 2023
Merged

Conversation

benmcmorran
Copy link
Member

This PR ships platform specific copies of arduino-cli version 0.29.0 with the extension and updates the Arduino path resolution logic to resolve to the bundled copy if arduino.useArduinoCli is true and arduino.path and arduino.commandPath are unset. It also adds two notifications to guide users towards using the bundled arduino-cli.

First, if the Arduino path specified in the settings can't be resolved, this notification appears when running commands.

image

Second, if arduino.useArduinoCli is false, this notification appears even if the configuration is a valid usage of Arduino IDE.

image

This notification is intentionally annoying with slightly aggressive wording because we'd like to stop supporting Arduino IDE. There's no way to permanently dismiss this notification without moving to arduino-cli.

Unfortunately, the second notification will appear even on first use of new installations, because arduino.useArduinoCli still defaults to false. We're stuck with this behavior because if we change the default value of arduino.useArduinoCli in this release, we'll end up breaking workflows that are intentionally using Arduino IDE but rely on the current default value.

// 2. Resolve arduino path from the bundled arduino-cli, if CLI support is enabled.
const bundledPath = await this.bundledArduinoCliPath();
if (bundledPath && this._useArduinoCli && !this._commandPath) {
// The extension VSIX stipped the executable bit, so we need to set it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: stipped should be skipped

@benmcmorran benmcmorran merged commit 19b4fd8 into main Feb 8, 2023
@benmcmorran benmcmorran deleted the dev/bemcmorr/bundle-arduino-cli branch February 8, 2023 19:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants