-
-
Notifications
You must be signed in to change notification settings - Fork 489
#573 Listen on the client's port change event #1545
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
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.
Tested it and it works just fine. I've just left a little remark on the code, but to me it's already okay ✅
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 am not able to reproduce the fault so I can't verify that the change proposed here fixes it.
I don't experience any problems when using the build for this PR though.
If the board select dialog is listening on the backend's event, the frontend might miss the event when it comes up, although boards are connected and ports are discovered. Closes #573 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
46e1253
to
43f7720
Compare
Motivation
Listen on the client's port changes to fix intermittent failure to recognize ports.
The problem was that the board select dialog was listening on the backend's board/port changes to show the available ports in the dialog. This was fundamentally incorrect as the following use case could happen.
board list -w
gRPC equivalent, dispatches board/port change event but client is not started yet,It was never an issue with the
Tool
>Port
menu, as it was correctly listening on the client's events:arduino-ide/arduino-ide-extension/src/browser/contributions/board-selection.ts
Lines 109 to 111 in bc264d1
With the proposed changes, the dialog is correctly listening on the client's board/port changes, so it cannot miss the event.
Change description
Other information
Closes #573
Locally, it was easy to reproduce the defect. Attach boards before starting IDE2. When IDE2 is up, open the board select dialog. Ports were empty. Now, it should work with the build from this PR.
Reviewer checklist