Skip to content

Allow diagnostic tagging to use either push or pull diagnostics#62738

Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:taggerPull
Jul 18, 2022
Merged

Allow diagnostic tagging to use either push or pull diagnostics#62738
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:taggerPull

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Currently diagnostic tagging only uses push diagnostics. However, we would like to switch to pull diagnostics fully. This allows tagging to utilize pull diagnostics if that is on.

Note: when pull diagnostics is on the LSP client takes over several tagging roles (like squiggles). So if that's on, we disable our own taggers there since they're nto needed.

@ghost ghost added the Area-IDE label Jul 18, 2022
{
// We support inline diagnostics in both push and pull (since lsp doesn't support inline diagnostics yet).
return true;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dibarbet i assume we need this. Indeed, i haven't tested it yet, but i'm guessing that if you enable pull diagnostics you lost inline-diagnostics? I can't see how it could worth otherwise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah, just verified they currently don't appear with it on. thanks for the catch!

protected internal override bool SupportsDignosticMode(DiagnosticMode mode)
{
// We only support push diagnostics. When pull diagnostics are on, diagnostic fading is handled by the lsp client.
return mode == DiagnosticMode.Push;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dibarbet does LSP support fading?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

{
// We only support push diagnostics. When pull diagnostics are on, ellipses suggestions are handled by the
// lsp client.
return mode == DiagnosticMode.Push;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dibarbet does lsp support the ... tags for lightbulbs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This one? If so, yes
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

great!

{
// We support inline diagnostics in both push and pull (since lsp doesn't support inline diagnostics yet).
return true;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah, just verified they currently don't appear with it on. thanks for the catch!

protected internal override bool SupportsDignosticMode(DiagnosticMode mode)
{
// We only support push diagnostics. When pull diagnostics are on, diagnostic fading is handled by the lsp client.
return mode == DiagnosticMode.Push;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

{
// We only support push diagnostics. When pull diagnostics are on, ellipses suggestions are handled by the
// lsp client.
return mode == DiagnosticMode.Push;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This one? If so, yes
image

@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review July 18, 2022 17:42
@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 18, 2022 17:42
@CyrusNajmabadi CyrusNajmabadi requested a review from a team July 18, 2022 17:42
@CyrusNajmabadi CyrusNajmabadi enabled auto-merge July 18, 2022 17:42
@CyrusNajmabadi CyrusNajmabadi merged commit 2c86eb9 into dotnet:main Jul 18, 2022
@ghost ghost added this to the Next milestone Jul 18, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the taggerPull branch July 18, 2022 20:19
@allisonchou allisonchou modified the milestones: Next, 17.4 P1 Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants