Skip to content

Manually installed platforms are now shown in core search output #1151

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
wants to merge 1 commit into from

Conversation

silvanocerza
Copy link
Contributor

This also updates the json output and the gRPC interface

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

Fixes a command and related gRPC interface not returning the expected output.

  • What is the current behavior?

Calling core search doesn't return platforms installed manually in ~/Arduino/hardware folder.
Same thing for the related gRPC interface call.

  • What is the new behavior?

Calling core search returns platforms installed manually in ~/Arduino/hardware folder. This now works also in the related gRPC interface call.

The issue was caused by filtering out platforms that didn't have a name set.

Nope.

  • Other information:

Fixes arduino/arduino-pro-ide#355.


See how to contribute

@matthijskooijman
Copy link
Collaborator

The issue was caused by filtering out platforms that didn't have a name set.

I haven't looked closely, but all platforms (including manually installed ones) define a name in platform.txt? Wouldn't it make sense to use that one instead of the one from the JSON (at least for manually installed platforms)? That could be an alternative fix for this and/or ensure that manually installed platforms are shown with a name (assuming they are now shown without)?

@per1234
Copy link
Contributor

per1234 commented Jan 26, 2021

The description of arduino-cli core search:
https://arduino.github.io/arduino-cli/dev/commands/arduino-cli_core_search/

Search for a core in Boards Manager.

Manually installed platforms are not in Boards Manager, so based on this description I wouldn't expect them to appear in the list of packages available via Boards Manager. I do expect them to appear in arduino-cli core list ("Shows the list of installed platforms.", which they are even before this change.

So it seems to me that if arduino/arduino-pro-ide#355 is caused by manually installed platforms not showing up in arduino-cli core search then the problem is with Arduino Pro IDE rather than Arduino CLI.

I do agree with matthijskooijman that arduino-cli core list should use the value of the platform.txt name property for the "Name" field, as the Arduino IDE's Tools > Board menu does.

@silvanocerza
Copy link
Contributor Author

silvanocerza commented Jan 26, 2021

I haven't looked closely, but all platforms (including manually installed ones) define a name in platform.txt? Wouldn't it make sense to use that one instead of the one from the JSON (at least for manually installed platforms)? That could be an alternative fix for this and/or ensure that manually installed platforms are shown with a name (assuming they are now shown without)?

I do agree with matthijskooijman that arduino-cli core list should use the value of the platform.txt name property for the "Name" field, as the Arduino IDE's Tools > Board menu does.

It's fine for me, I prefered to fix this like so since I thought it to be faster and the least error prone approach. I'll change it then.

Manually installed platforms are not in Boards Manager, so based on this description I wouldn't expect them to appear in the list of packages available via Boards Manager. I do expect them to appear in arduino-cli core list ("Shows the list of installed platforms.", which they are even before this change.

So it seems to me that if arduino/arduino-pro-ide#355 is caused by manually installed platforms not showing up in arduino-cli core search then the problem is with Arduino Pro IDE rather than Arduino CLI.

I think that issue stems from the fact that the new IDE uses core search to get a list of boards that can be used, even the ones that are not currently installed. I think core list can't be used in that case since it returns only the currently installed cores, boards are not returned either by core list --format json but adding them should not be an issue. board listall either can't be used since they're not grouped by core. @kittaakos can you confirm?

This also updates the json output and the gRPC interface
@silvanocerza silvanocerza force-pushed the scerza/core-search-manually-installed branch from 3616d45 to 48585f0 Compare January 29, 2021 10:37
@silvanocerza
Copy link
Contributor Author

Closing this since we went with a different solution. That is PR #1166.

@silvanocerza silvanocerza deleted the scerza/core-search-manually-installed branch February 12, 2021 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please Recognize Programmers In ./1.2.2/programmers.txt
3 participants