Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

src/goLanguageServer.ts: remove fallbacks for features that cannot be opted-out of#3156

Merged
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
stamblerre:clean-up
Apr 17, 2020
Merged

src/goLanguageServer.ts: remove fallbacks for features that cannot be opted-out of#3156
ramya-rao-a merged 2 commits intomicrosoft:masterfrom
stamblerre:clean-up

Conversation

@stamblerre
Copy link
Copy Markdown
Contributor

@stamblerre stamblerre commented Apr 5, 2020

We should only have fallbacks for the features that we support opting out of.
Also, remove a few unused imports.

/cc @hyangah

Change-Id: I9f1eb872855ab6adf898efeb75d0b0138ab55709
Change-Id: I4ef333002ec2a1f9c09ef38243bf49b42979b40a
Comment thread src/goLanguageServer.ts
// gopls is the only language server that provides live diagnostics on type,
// so use gotype if it's not enabled.
if (!(toolName === 'gopls' && config.features['diagnostics'])) {
vscode.workspace.onDidChangeTextDocument(parseLiveFile, null, ctx.subscriptions);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wont we need this if user has opted out of diagnostics?

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.

I would prefer to avoid these types of fallbacks, as it can make debugging gopls issues difficult. I don't see a reason that someone would opt-out of gopls diagnostics on-type, but still want diagnostics on type from a different tool.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see a reason that someone would opt-out of gopls diagnostics on-type, but still want diagnostics on type from a different tool.

Previously, it has been mainly due to the issues with the diagnostics feature from gopls. If we are saying that all of those issues are resolved, then my next question would be as to what are the cases where one doesnt want diagnostics on type

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.

I think there is some set of people that prefer to have their diagnostics only show up on save, not on-type. I think at this point, if someone is having issues with gopls diagnostics, we should work with them to resolve the issue, or they can disable gopls, but we can't let people replace the diagnostics - it's too confusing for debugging purposes.

@ramya-rao-a ramya-rao-a merged commit c8ed3d8 into microsoft:master Apr 17, 2020
@stamblerre stamblerre deleted the clean-up branch April 28, 2020 05:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants