-
-
Notifications
You must be signed in to change notification settings - Fork 424
Report is_hidden
field in board identification
#2224
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
Report is_hidden
field in board identification
#2224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kittaakos is this field used by the IDE?
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@ ## master #2224 +/- ## ========================================== - Coverage 62.99% 62.95% -0.04% ========================================== Files 220 220 Lines 19477 19477 ========================================== - Hits 12269 12262 -7 - Misses 6128 6132 +4 - Partials 1080 1083 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@kittaakos is this field used by the IDE?
No, it's unused in IDE2. What's the purpose of this property?
If the board is marked as "hidden" in the platform
It comes from here https://arduino.github.io/arduino-cli/0.33/platform-specification/#hiding-boards
And here works correctly: In the Tools > Board menu the hidden board is not visibile.
The problem is that this field do not have anything to do in filtering of the board list
command.
here works correctly: In the Tools > Board menu
Do you mean this in IDE2?
Screenshot 2023年06月23日 at 14 11 23
IDE2 uses the gRPC equivalent of ./arduino-cli board listall
to populate the above menu per platform.
Slightly off:
The problem is that this field do not have anything to do in filtering of the
board list
command.
As a long-time user of the CLI API, I recommend not reusing the same type for different command responses. The commands board search
, board listall
, and board list
are perfect examples. On the gRPC level, all response objects refer to a "board" concept as a BoardListItem
, but the props are populated on different conditions. Please make it easier for clients to see what response object structure to expect.
For example, fqbn
could be available on a board from the board list
command response even if the platform is not installed. This behaves differently for board serarch
.
Do you mean this in IDE2?
No, the equivalent of board list
is the "Tools > Port" selection menu (DetectedBoard
in gRPC world).
What we want to know is: when a hidden board is detected is it displayed in the "Tools > Port" menu?
Previously the matching_boards[].is_hidden
field was not populated (even if present in the gRPC structure), it was always false, instead after this patch is now populated correctly:
{
"matching_boards": [
{
"name": "Arduino Uno R4 WiFi",
"fqbn": "arduino:renesas_portenta:unor4wifi",
"is_hidden": true <---------------------
},
{
"name": "Arduino Uno R4 WiFi",
"fqbn": "arduino:renesas_uno:unor4wifi"
}
],
"port": {
"address": "/dev/ttyACM0",
"label": "/dev/ttyACM0",
"protocol": "serial",
"protocol_label": "Serial Port (USB)",
"properties": {
"pid": "0x1002",
"serialNumber": "DC5475C30184",
"vid": "0x2341"
},
"hardware_id": "DC5475C30184"
}
},
As a long-time user of the CLI API, I recommend not reusing the same type for different command responses. The commands board search, board listall, and board list are perfect examples. On the gRPC level, all response objects refer to a "board" concept as a BoardListItem, but the props are populated on different conditions. Please make it easier for clients to see what response object structure to expect.
This change is exactly to solve this problem, we reused BoardListItem
but the is_hidden
field was correctly populated only in the board listall
command (so I expect the "hidden" boards to be correctly hidden in the Tools > Board menu).
What we want to know is: when a hidden board is detected is it displayed in the "Tools > Port" menu?
Probably. IDE2 does not use the isHidden property at all.
Uh oh!
There was an error while loading. Please reload this page.
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
Populates the
is_hidden
field when the board is detected.What is the current behavior?
board list
do not report hidden field:What is the new behavior?
board list
do report hidden field:Does this PR introduce a breaking change, and is titled accordingly?
No
Other information
At the moment this is only reported as metadata in JSON / gRPC responses, it has no direct effect on the
board list
command. A board filtering based on theis_hidden
value may be implemented later.