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

Incorrect configuration schema #105

Open
rotu opened this issue Oct 9, 2022 · 1 comment
Open

Incorrect configuration schema #105

rotu opened this issue Oct 9, 2022 · 1 comment

Comments

@rotu
Copy link

rotu commented Oct 9, 2022

In this project, nim.projectMapping is defined as an object:

vscode-nim/package.json

Lines 202 to 207 in a937ed1

"nim.projectMapping": {
"type": "object",
"default": {},
"description": "For non project mode list of per file project mapping using regex, for example ```{\"(.*).inim\": \"$1.nim\"}```",
"scope": "resource"
},

But in the language server, it's defined as a sequence/list: https://github.com/nim-lang/langserver/blob/4878cbce6fb0b097f2dcef7cd6d3e5d494bf278a/nimlangserver.nim#L22
https://github.com/nim-lang/langserver/blob/3fcf4c87904ec691ebca035872a4913000fa85df/README.md?plain=1#L40-L44

This mismatch causes either:

  • the settings editor to complain "Incorrect type. Expected "object"."
  • the nim langage server to ignore the configuration with "DBG Failed to parse the configuration." and seemingly not work at all. There also seem to be other error messages like "A request has failed. See the output for more information."

This should be corrected and a more descriptive error message should happen when the config is broken.

@rotu
Copy link
Author

rotu commented Oct 9, 2022

Possibly responsible for:

#102
#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant