Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Show core name when listing boards #395

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
masci merged 3 commits into master from massi/show-core
Sep 10, 2019
Merged

Show core name when listing boards #395

masci merged 3 commits into master from massi/show-core
Sep 10, 2019

Conversation

Copy link
Contributor

@masci masci commented Sep 5, 2019
edited
Loading

Fixes #191

Now that #336 has been released, the vicious cycle of not knowing the board name if the corresponding core is not available, and not knowing which core to install without the board name, is finally broken.

To help users who are not familiar with the FQBN concept to better understand which core has to be installed, a new column in the output of board list was added to show the name of the core that supports the detected board.

The README was updated accordingly.

Note: the core name wasn't added to the JSON output because that would require a non trivial amount of code - provided that the JSON output is supposed to be read by a machine and provided that the name of the core can be easily deduced from the data the CLI already provides, my advice is to avoid making the code too complex and let client applications do a little extra work when needed.

@masci masci requested review from cmaglie and per1234 September 5, 2019 16:30
@masci masci marked this pull request as ready for review September 5, 2019 16:39
@masci masci added component/CLI topic: documentation Related to documentation for the project labels Sep 5, 2019
@masci masci added this to the 0.6.0 milestone Sep 5, 2019
@masci masci changed the title (削除) Show core when listing boards (削除ここまで) (追記) Show core name when listing boards (追記ここまで) Sep 5, 2019
Copy link
Contributor

@rsora rsora left a comment
edited
Loading

Choose a reason for hiding this comment

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

Excellent!
Ok for not providing the core name as a JSON output field, the aim in this case is to improve the UX

Copy link
Member

@cmaglie cmaglie left a comment

Choose a reason for hiding this comment

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

just a small nitpick, for the rest 👍

board := b.GetName()
fqbn := b.GetFQBN()
t.AddRow(address, protocol, board, fqbn)
core := fqbn[:strings.LastIndex(fqbn, ":")]
Copy link
Member

@cmaglie cmaglie Sep 6, 2019

Choose a reason for hiding this comment

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

we have some infra for FQBN parsing here https://github.com/arduino/arduino-cli/blob/master/arduino/cores/fqbn.go#L36 that would be nice using here.

masci reacted with thumbs up emoji
@masci masci merged commit cc5e3d6 into master Sep 10, 2019
@masci masci deleted the massi/show-core branch September 10, 2019 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@cmaglie cmaglie cmaglie approved these changes

@per1234 per1234 per1234 approved these changes

+1 more reviewer

@rsora rsora rsora approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: documentation Related to documentation for the project
Projects
None yet
Milestone
0.6.0
Development

Successfully merging this pull request may close these issues.

Please specify instructions better

AltStyle によって変換されたページ (->オリジナル) /