Skip to content

workaround: stop discoveries before install/uninstall boards/libs #674

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
merged 1 commit into from
Dec 10, 2021

Conversation

fstasi
Copy link
Contributor

@fstasi fstasi commented Dec 10, 2021

Why

After installing a board/library the discoveries are be broken: plugging or unplugging a board has no effect on the UI.
This issue is 100% reproducible on windows and a minority of mac users are affected as well.

The reason is that, in some circumstances that need to be further investigated, the CLI is not sending the quit or end message when an install/uninstall action is perfomed. ( cc @silvanocerza )

This causes the IDE not to restart the watchers on the board discoveries when needed (as it's never been informed they ever stopped).

Being the watchers broken, the UI do not react to changes that communicated (correctly) from the CLI.

How

This workaround perform a stop of the discoveries from the IDE side before any install/uninstall operation.
Calling the stop from the IDE actually fixes the problem as the CLI correctly answers with the end message and the IDE can be informed and hence restart the discoveries when needed.

Note

This is a workaround as the correct way to approach the issue should be on the CLI side: there is no reason why the business logic of stopping/restarting the boards watchers shoud be on the IDE.
The IDE should be transparent to what happens on the CLI side, as the CLI should just stop sending the boardsList messages when an install/uninstall is in progress, then communicate the new state to the IDE at the end of its internal routines

fixes #671

@fstasi fstasi changed the title fix discoveries workaround: stop discoveries before install/uninstall Dec 10, 2021
@fstasi fstasi changed the title workaround: stop discoveries before install/uninstall workaround: stop discoveries before install/uninstall boards/libs Dec 10, 2021
Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

This fixes several issues
LGTM

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

I am able to reproduce #671 in addition to the general problem of the discovery tools no longer running after a Library/Boards Manager operation with the build from before this change.

I am no longer able to reproduce those bugs with the build from this PR.

Thanks @fstasi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discoveries never run on first start up
3 participants