-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
Fix loading platforms with malformed boards.txt #1326
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
per1234
requested changes
Jun 17, 2021
Co-authored-by: per1234 <accounts@perglass.com>
per1234
requested changes
Jun 17, 2021
per1234
requested changes
Jun 18, 2021
per1234
approved these changes
Jun 18, 2021
5 tasks
Closed
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Makes the CLI more resilient by avoiding loading boards not respecting the specification.
Boards that specify a custom option like this:
are always loaded, even if the option
menu.cpu
is not defined anywhere else inboards.txt
file.This may cause issues and crashes for other commands that expect this
menu.cpu
property to exist like the specification states.From https://arduino.github.io/arduino-cli/dev/platform-specification/#custom-board-options
This is an example of the problems the missing option definition may cause:
The
SparkFun:samd:samd51_thing_plus
board in this case defines the following options:But
menu.cache
is not defined anywhere in theboards.txt
.Boards that define a custom option like stated above won't be loaded anymore if the related
menu.MENU_ID=Text
is not defined anywhere in theboards.txt
.A warning will be displayed to the user reminding them that the boards are not loaded. The platform will still be loaded correctly.
titled accordingly?
Nope.
As of now this mainly affects the
SparkFun:samd
platform, there is an open PR that fixes this issue: sparkfun/Arduino_Boards#73.Am not sure if there are other platforms that will be affected.
See how to contribute