-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
fix(plugin): decouple state update from the LS #2643
base: main
Are you sure you want to change the base?
fix(plugin): decouple state update from the LS #2643
Conversation
To enhance the reliability of Arduino IDE extensions, the update process for `ArduinoState` has been modified to ensure independence from the language server's availability. This change addresses issues caused by `compileSummary` being `undefined` due to potential startup failures of the Arduino Language Server, as noted in dankeboy36/esp-exception-decoder#28 (comment). The `compile` command now resolves with a `CompileSummary` rather than `void`, facilitating a more reliable way for extensions to access necessary data. Furthermore, the command has been adjusted to allow resolution with `undefined` when the compiled data is partial. By transitioning to direct usage of the resolved compile value for state updates, the reliance on executed commands for extensions is eliminated. This update also moves the VSIX command execution to the frontend without altering existing IDE behavior. Closes arduino#2642 Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
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.
Thank for the PR, it all makes sense barring one minor change 👍
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.
We need to also add libsecret-1-dev
as a dependency for Linux tasks to fix the build.
I'm happy to create a new PR by cherry picking your commits or we can update this one; same for me!
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
+ event emitter dispatches the new state. Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
I liked your solution (b11bde1) and cherry-picked it here. Let me know if it's OK for you. |
revert of arduino@b11bde1 Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
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.
Thanks 🙏
Thank you for reviewing the PR multiple times. If it looks good, can you please merge it? |
Motivation
To enhance the reliability of Arduino IDE extensions, the update process for
ArduinoState
has been modified to ensure independence from the language server's availability. This change addresses issues caused bycompileSummary
beingundefined
due to potential startup failures of the Arduino Language Server, as noted in dankeboy36/esp-exception-decoder#28 (comment).Change description
The
compile
command now resolves with aCompileSummary
rather thanvoid
, facilitating a more reliable way for extensions to access necessary data. Furthermore, the command has been adjusted to allow resolution withundefined
when the compiled data is partial.Other information
By transitioning to direct usage of the resolved compile value for state updates, the reliance on executed commands for extensions is eliminated. This update also moves the VSIX command execution to the frontend without altering existing IDE behavior.
Closes #2642
Reviewer checklist