Skip to content

Fix empty name on manually installed platforms without platform.txt #1322

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

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

silvanocerza
Copy link
Contributor

@silvanocerza silvanocerza commented Jun 17, 2021

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?

Bug fix.

  • What is the current behavior?

If a platform installed manually in the Sketchbook hardware folder doesn't have a platform.txt file its name will be empty.

$ arduino-cli core list                                                                                                                                                                                     
ID                            Installed Latest Name                                                                                                                                                 
arduino-beta-development:samd                                                                                                                                                                       
arduino:avr                   1.8.3     1.8.3  Arduino AVR Boards

The above arduino-beta-development:samd platform is installed in ~/Arduino/hardware/arduino-beta-development/samd.

  • What is the new behavior?

If a platform installed manually in the Sketchbook hardware folder doesn't have a platform.txt file its name will be composed by the packager name and the architecture separated by an hyphen (-).

$ arduino-cli core list
ID                            Installed Latest Name                         
arduino:avr                   1.8.3     1.8.3  Arduino AVR Boards           
arduino-beta-development:samd                  arduino-beta-development-samd

The above arduino-beta-development:samd platform is installed in ~/Arduino/hardware/arduino-beta-development/samd, so arduino-beta-development is assumed to be the packager and samd the architecture.

Nope.

  • Other information:

This is the same behaviour of the Java IDE and affects the gRPC interface so it will be fixed in the IDE 2 too.


See how to contribute

@silvanocerza silvanocerza added type: bug topic: code Related to content of the project itself labels Jun 17, 2021
@silvanocerza silvanocerza requested a review from a team June 17, 2021 09:08
@silvanocerza silvanocerza self-assigned this Jun 17, 2021
Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

works as expected

@silvanocerza silvanocerza merged commit b7bcf00 into master Jun 17, 2021
@silvanocerza silvanocerza deleted the scerza/fix-nameless-platform-loading branch June 17, 2021 09:50
@rsora rsora added type: imperfection Perceived defect in any part of project topic: core labels Sep 22, 2021
@per1234 per1234 added type: bug and removed type: imperfection Perceived defect in any part of project labels Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants