prometheus-community / promql-langserver

PromQL language server
Apache License 2.0
176 stars 18 forks source link

Unsuccessful cast when setting configuration from VS Code #193

Closed slrtbtfs closed 4 years ago

slrtbtfs commented 4 years ago

This cast

https://github.com/prometheus-community/promql-langserver/blob/356efaf3f31e909b86fb593011524df8ad5c1363/langserver/config.go#L45

always fails, which makes it impossible to set configuration from VS Code.

To actually work, there first would need to be a cast to map[string]interface{} and then a second cast for the promql field.

Nexucis commented 4 years ago

can you try to display the error?

slrtbtfs commented 4 years ago

This requires a slightly patched version of the VS Code extension, which reflects the recent changes in the YAML config.

The error produced is this one:

https://github.com/prometheus-community/promql-langserver/blob/356efaf3f31e909b86fb593011524df8ad5c1363/langserver/config.go#L48-L51

Nexucis commented 4 years ago

ah ok I was more expected an unmarshal error :/, I missed a bit it was a cast issue. I will take a look at it then.