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

[BUG] Language server doesn't recognize the existence of ksconfig.json until you open that file #167

Open
scimas opened this issue Dec 3, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@scimas
Copy link

scimas commented Dec 3, 2020

Describe the bug
As the title says, the options specified in ksconfig.json aren't applied until I actually open the ksconfig.json file. Even then, it only appears to apply the linting options, the "file doesn't exist" warnings stay in place even though the archive option is set. I have to make some change in the .ks file for it to recognize that the paths are actually correct (a dummy change like press backspace once is enough to "refresh" the state of paths).

To Reproduce
Steps to reproduce the behavior:
This is my directory structure

KOS-Scripts
|-- ksconfig.json
|-- Script
|   |-- library
|   |   |-- lib_navigation.ks
|   |-- scripts
|   |   |-- node_execute.ks

ksconfig.json has

{
    "archive": "Script",
    "linting": {
        "file-loading": "hint"
    }
}

And node_execute.ks makes reference to lib_navigation.ks through

// #include "0:/library/lib_navigation.ks"

But as soon as I start vscode, the extension outputs [Warn - <timestamp>] Error: ENOENT: no such file or directory, open 'KOS-Scripts\library\lib_navigation.ks'.

If I open ksconfig.json in an editor tab at this point, the file warnings go from warn to hint, but it still complains that the file doesn't exist. It is only after I make a dummy edit to the file node_execute.ks or close and reopen it does the server make the warnings go away and start showing the function definitions and such.

This problem has existed for as long as the ksconfig.json has been introduced, as far as I can tell. I just got around to reporting it now.

Expected behavior
I shouldn't need to open ksconfig.json for the options defined there to come into effect.

Editor (please complete the following information):

  • OS: Windows 10
  • Editor: vscode v1.51.1 user setup
  • Extension Version: v1.1.5
@jonnyboyC
Copy link
Owner

I appreciate the report, especially all the detailed reproduction. I'll try to dust this project off this weekend and get this and a few other pending bugs dealt with.

@Tahvohck
Copy link

Been dealing with this myself. Any chance on an update to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants