Skip to content
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

Show toast when project loading fails #6060

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

dibarbet
Copy link
Member

@dibarbet dibarbet commented Aug 7, 2023

Resolves #6038

image

Server side - dotnet/roslyn#69424

@@ -198,6 +199,25 @@ export class RoslynLanguageServer {
);
});

this._languageClient.onNotification(RoslynProtocol.ProjectLoadFailureNotification.type, async (failure) => {
Copy link
Member

Choose a reason for hiding this comment

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

If we have a bunch of notifications at once are we going to spam the user? Or does VS Code throttle this in some way for us?

Copy link
Member

Choose a reason for hiding this comment

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

+1. Can we kick off an array of projects and 1 collated exception that failed load instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

from testing it looks like only 1 shows at once

Copy link
Member

Choose a reason for hiding this comment

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

@dibarbet Once that's dismissed though, does the next one appear? Or the other are just ignored?

Copy link
Member Author

Choose a reason for hiding this comment

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

the others are ignored. I was OK with that because these just point to the logs which will show all the errors.

@@ -198,6 +199,25 @@ export class RoslynLanguageServer {
);
});

this._languageClient.onNotification(RoslynProtocol.ProjectLoadFailureNotification.type, async (failure) => {
Copy link
Member

Choose a reason for hiding this comment

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

+1. Can we kick off an array of projects and 1 collated exception that failed load instead?

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

It'd be nice if LSP supported this automatically!

I left one comment on the Roslyn side wondering if we should be using a prefix for the notification name, which would apply to this PR.

@jasonmalinowski jasonmalinowski linked an issue Aug 8, 2023 that may be closed by this pull request
@dibarbet dibarbet enabled auto-merge August 8, 2023 01:39
@dibarbet dibarbet merged commit 8dc2b9c into dotnet:main Aug 8, 2023
3 of 4 checks passed
@dibarbet dibarbet deleted the show_project_load_error branch August 8, 2023 01:56
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.

Make project load failures more visible in the UI
3 participants