Skip to content

Use more efficient method to get Arduino CLI version #1572

Closed
@per1234

Description

@per1234

Use more efficient method to get Arduino CLI version

Describe the request

Employ a technique for obtaining the version of the bundled Arduino CLI that does not trigger the pointless update check.

🙂 The Help > About Arduino IDE menu item will be responsive.

Describe the current behavior

The Help > About Arduino IDE menu item opens a dialog which displays information about the Arduino IDE. This includes the version of the bundled copy of Arduino CLI.

The Arduino CLI version is obtained by running the following command:

arduino-cli version --format json

In addition to displaying the version, this command triggers a check for the availability of a newer version of Arduino CLI:

https://github.com/arduino/arduino-cli/blob/5efa9b5d3596d4dd88f16813d1018f3f60481b05/cli/version/version.go#L61

While that update check is useful to the users running the command directly, it is completely pointless for this application, both because the IDE does not even use the information about availability of an update and because the IDE is designed to use a specific version of Arduino CLI and updating the bundled Arduino CLI to a new version is strongly discouraged.

For unknown reasons (perhaps transient network conditions), this update check sometimes takes on the order of a few seconds to complete.

🙁 The dialog opening is blocked while waiting, which is a poor experience for the user who will frustrated that such a simple dialog should be so slow to open.

ide

Arduino IDE version

2.0.1-snapshot-32d904c

Operating system

Windows

Operating system version

10

Additional context

The update check will not be done when a non-release version of Arduino CLI is bundled with the IDE, so make sure your IDE meets that condition if trying to reproduce the slow dialog opening.


The slow update check is intermittent. It does happen frequently though so you should be able to reproduce it within several cycles of opening and closing the dialog.


Previously discussed in passing at #1289 (comment)

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions