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

Upgrade server to 0.20 #20

Closed
2 of 3 tasks
robb-j opened this issue Jun 17, 2021 · 8 comments
Closed
2 of 3 tasks

Upgrade server to 0.20 #20

robb-j opened this issue Jun 17, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@robb-j
Copy link
Owner

robb-j commented Jun 17, 2021

This version pulls config which should be better than us having to force it.

Todos

  • Upgrade server to 0.20
  • Get completions working again
  • Pass k8s schema config again
@robb-j
Copy link
Owner Author

robb-j commented Jun 17, 2021

Need to find a new way to pass custom k8s schema configuration to the server now. It can't go in nova config as it is an object which nova doesn't support.

It also isn't offering completion anymore and there is a new unhandled promise rejection warning.

@robb-j robb-j added the enhancement New feature or request label Jun 17, 2021
@robb-j
Copy link
Owner Author

robb-j commented Jun 25, 2021

After more investigation is seems the way Server pulls http config might be breaking the schemaStore http request. The Server does this request for configuration:

{ section: 'yaml' },
{ section: 'http.proxy' },
{ section: 'http.proxyStrictSSL' },
{ section: '[yaml]' },

I can't find anywhere in the LSP spec about dot-notation and nesting keys inside configuration, so I am assuming it is something specific that VSCode does. From Nova it returns:

{ ... },
{},
{},
{ ... }

So I assume nova isn't expecting there to be more than one level of indentation via dots.

If I set this configuration via .nova/Configuration.json:

"http.proxy": null,
"http.proxyStrictSSL": null

That same workspace/configuration request returns:

{ ... },
{ 'http.proxy': null },
{ 'http.proxyStrictSSL': null },
{ ... }

...which doesn't work either. The server is passing these values to requests_light to set the proxy URLs which is failing to URL.parse either of the returned values and it is getting to that point because {} and { 'http.proxy': null } are truthy.

Looking at the debug logs of VSCode, it is returning this:

[
  "{ ... }",
  "",
  true,
  "{ ... }"
]

@robb-j
Copy link
Owner Author

robb-j commented Jun 25, 2021

Related to dot-notation in workspace/configuration, I'm not sure what is expected on the value side. It seems that VSCode is expanding dot-notation configuration into full JavaScript objects, e.g.

{
  "format": {
    "enable": false
  }
}

Whereas Nova is keeping the dots in the values:

{
  "format.enabled": true
}

The Server is expecting expanded JSON and doesn't do anything to expand the dot-notation either, as I have seen format.enabled as a key on configuration while debugging the Server.

@robb-j
Copy link
Owner Author

robb-j commented Jun 25, 2021

@robb-j
Copy link
Owner Author

robb-j commented Jun 25, 2021

I've put in a feature request for better contorl of LSP configuration

https://devforum.nova.app/t/workspaceconfiguration-middleware/989

@robb-j
Copy link
Owner Author

robb-j commented Jul 15, 2021

The LanguageServer processes workspace/didChangeConfiguration by pulling configuration from the client and doesn't accept the values it passed. The only way to inject Kubernetes mappings now would be to:

  • Implement the custom request (which doesn't work in nova)
  • Configure the settings passed (Which is in the Nova feature request)

@robb-j
Copy link
Owner Author

robb-j commented Jul 15, 2021

I've put in a custom schema bug report https://devforum.nova.app/t/languageclient-onrequest-isnt-being-called/1064

@robb-j
Copy link
Owner Author

robb-j commented Aug 25, 2021

Fixed in ee762c9

@robb-j robb-j closed this as completed Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant