Skip to content

IDE2 nighty build should show the exact CLI version instead of CLI Version: 0.0.0-git [] #1313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
kittaakos opened this issue Aug 10, 2022 · 3 comments · Fixed by #1315
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@kittaakos
Copy link
Contributor

Describe the request

The IDE2 nightly might use a not yet released CLI version. In such a case, the CLI version is CLI Version: 0.0.0-git [] which is not informative when accessed from the About dialog. IDE2 should parse the package.json, get the version object, and show the pinned CLI version instead of 0.0.0-git.

Screen Shot 2022-08-10 at 11 11 28

Describe the current behavior

See description.

Arduino IDE version

Version: 2.0.0-rc9.1-nightly-20220809 Date: 2022-08-09T03:33:26.061Z CLI Version: 0.0.0-git []

Operating system

macOS

Operating system version

13.2.1

Additional context

No response

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
@kittaakos kittaakos added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Aug 10, 2022
@kittaakos kittaakos self-assigned this Aug 10, 2022
@per1234
Copy link
Contributor

per1234 commented Aug 10, 2022

The better resolution would be to use the correct method of building Arduino CLI:

https://arduino.github.io/arduino-cli/dev/CONTRIBUTING/#building-the-source-code

Arduino IDE is currently using an unsupported approach to building Arduino CLI:

if (shell.exec('go build', { cwd: tempRepoPath }).code !== 0) {

The missing version information is fairly innocuous, but it is possible this approach might cause other problems since we assume task build will always be used.

@per1234 per1234 added the topic: CLI Related to Arduino CLI label Aug 10, 2022
@kittaakos
Copy link
Contributor Author

The better resolution would be to use the correct method of building Arduino CLI:

If IDE2 uses task build instead of go build will the arduino-cli version show that the CLI was created from a fork when it was made from a fork?

@per1234
Copy link
Contributor

per1234 commented Aug 10, 2022

It will only show the short hash:

$ arduino-cli version --format json
{
  "Application": "arduino-cli.exe",
  "VersionString": "git-snapshot",
  "Commit": "869c9711",
  "Status": "",
  "Date": "2022-08-10T09:40:36Z"
}

I think it is sufficient to identify the version in use.

kittaakos pushed a commit that referenced this issue Aug 10, 2022
Closes #1313

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 10, 2022
Closes #1313

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
kittaakos pushed a commit that referenced this issue Aug 10, 2022
Closes #1313

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos added the conclusion: resolved Issue was resolved label Aug 11, 2022
kittaakos pushed a commit to kittaakos/arduino-ide that referenced this issue Aug 11, 2022
Closes arduino#1313

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants