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

Invalid type <nil> for []string option "experimentalDisabledAnalyses" in lsp-go #1096

Closed
seagle0128 opened this issue Oct 14, 2019 · 11 comments · Fixed by #1097
Closed

Invalid type <nil> for []string option "experimentalDisabledAnalyses" in lsp-go #1096

seagle0128 opened this issue Oct 14, 2019 · 11 comments · Fixed by #1097
Assignees
Labels

Comments

@seagle0128
Copy link
Collaborator

seagle0128 commented Oct 14, 2019

Recently many people got this error while using lsp-go.

LSP :: Invalid type <nil> for []string option "experimentalDisabledAnalyses"
@yyoncho
Copy link
Member

yyoncho commented Oct 14, 2019

@Gastove this seems to be related to your PR #1086, willing to take a look?

@seagle0128
Copy link
Collaborator Author

I found the root cause. It's related to #1086.

lsp-gopls-experimental-disabled-analyses should be an array while not a list according to https://github.com/golang/tools/blob/master/gopls/doc/settings.md#experimental.

@seagle0128 seagle0128 added the bug label Oct 14, 2019
@seagle0128
Copy link
Collaborator Author

seagle0128 commented Oct 14, 2019

I am trying to fix it, but more issues occur. e.g.

LSP :: invalid config gopls.env type string
LSP :: unexpected config staticcheck

I'd like leave this to @Gastove to check all settings in #1086.

@Gastove
Copy link
Contributor

Gastove commented Oct 14, 2019

Ruh-roh. @yyoncho yes, happy to take a look; I'm tied up for the next eight hours or so, but can dig in after that.

@yyoncho
Copy link
Member

yyoncho commented Oct 14, 2019

Sure, meanwhile we may revert the PR, @seagle0128 @Gastove WDYT?

@seagle0128
Copy link
Collaborator Author

seagle0128 commented Oct 14, 2019

It's fine if @Gastove can fix soon, since the basic completion functionality does work well.

@Gastove
Copy link
Contributor

Gastove commented Oct 14, 2019

I'm content either way. I'll get to this as quick as I can, and the fix PR will be clearer if we don't revert.

@Gastove
Copy link
Contributor

Gastove commented Oct 14, 2019

Hokay, one of these I misunderstood on the first pass, and the other I just straight-up got wrong.

So, just to make sure I now have this right:

  • lsp-gopls-experimental-disabled-analyses nees to be an array of strings, so should default to [], not (list)
  • lsp-gopls-env should serialize to an object, which means a list of pairs, right? E.G. '(("ENV_VAR" . "var value")).

@yyoncho can you confirm the above is correct?

@yyoncho
Copy link
Member

yyoncho commented Oct 14, 2019

Yes, you can use also plist and hash-table if you want to have a object on the wire.

@Gastove
Copy link
Contributor

Gastove commented Oct 14, 2019

Great. Do y'all have a standard practice? I've no strong attachment to any particular approach, would rather do what's most normal.

@yyoncho
Copy link
Member

yyoncho commented Oct 14, 2019

We don't have a standard for this.

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 a pull request may close this issue.

3 participants