-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[plugin] don't fail if a command returns not serializable result or error #7957
Conversation
…result or error Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
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.
@akosyakov
I tested a little and still have some problems related to Find All References
Sometimes it works well, but sometimes the behavior is the same as described in the issue.
For example, it doesn't work for me after closing References
, please see the short video
I don't know - maybe I faced with another issue...
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 have verified it in Gitpod, I do not see the error with the changes from the PR. 👍 The References view opens.
Few remarks:
- the References view opens and works from
master
too despite the serialization error. - the References view integration is not so nice, I thought we reveal the view just as VS Code does. Apparently, we just open it but do not reveal it. (See the attached screencast)
function safeStringify(obj: any, replacer?: JSONStringifyReplacer): string { | ||
try { | ||
return JSON.stringify(obj, replacer); | ||
} catch (err) { |
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.
You can omit err
.
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.
or leave it for debugging purposes :)
Checked whether this PR fixes #7853 as alternative of #7959. Everything works well: @akosyakov as I understand, this PR #7959 is redundant now? |
yes i think it is covered |
@RomanNikitenko I could reproduce your issue with closing the view. I've pushed another commit. There was a race. We tried to focus the view before it was completely registered in the shell. Now the widget manager awaits when the view widget is registered before announcing it as created. Could you check again please? |
@akosyakov @vzhukovskii could you check this use case on your side please. |
My bad I used |
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
5525057
to
9a19f1c
Compare
@RomanNikitenko @vzhukovskii I've pushed again. |
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 after update - it works well for me!
thanks!
What it does
How to test
Find All References
from the editor context menu for the typescript file.References
view should be revealed.Review checklist
Reminder for reviewers