-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[chip-tool] Add Optional endpoint id for the test command #11740
[chip-tool] Add Optional endpoint id for the test command #11740
Conversation
Fast tracking, given this is adding functionality to a test tool. |
5f32d8d
to
55db910
Compare
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.
I don't understand how this can work given the code as it landed in PR #11729. That code will error out (with a very confusing message) if an optional argument is actually passed, and optional arguments are not initialized in that code [Edit: this claim is wrong].
I feel like the approach in #11642 at least answers those questions, and that answer is that you use named optional args and make the names look like something that looks like a command-line-arg naming convention, so in this case "--endpoint-id" or so.
Seems like we should fix that, and then this approach, with Optional
, seems fine.
PR #11740: Size comparison from 5d4bade to 55db910 Increases above 0.2%:
Increases (1 build for linux)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
The code just assume that if you have arguments I agree, that adding a way to specify the argument is good, and I spoke with @krypton36 about adding support for it already as a way to make #11729 better. |
Right, but that's a pretty weird thing to require. In any case, I see I was misreading it and we do initialize the optionals, so I guess this is ok as-is for now. |
…ip#11740) * [chip-tool] Add optional endpoint id for the test command * Update generated content
Problem
It is useful to override the endpoint id uses by
chip-tool
for the test commandChange overview