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

Extension shows problems in already-deleted file #118

Open
LucianU opened this issue Mar 6, 2019 · 4 comments
Open

Extension shows problems in already-deleted file #118

LucianU opened this issue Mar 6, 2019 · 4 comments
Labels

Comments

@LucianU
Copy link

LucianU commented Mar 6, 2019

I was working in a file and, at some point, encountered issues, which the extension showed in the Problems pane. Then, I decided I didn't need that file and deleted it. However, the extension still showed problems in that file. I tried running Restart/reconnect purs IDE server, but that didn't fix the issue. Only closing and reopening VS Code did.

@nwolverson
Copy link
Owner

Workaround: Use "Reload Window" in vscode to be marginally less annoying than closing/reopening.

There are some conditions when errors will not be valid (i.e. either showing old errors persisted or no errors will not match the real project status), I think it is indeed clearer if we make sure errors are cleared in this case.

Should also test a full build removes these errors on deleting the file.

Care less about errors not disappearing on removing the individual file as I think IDE server state will also be invalid here - though maybe we can detect it and solve both issues or warn.

@LucianU
Copy link
Author

LucianU commented Apr 4, 2019

I believe there's a more general issue here and I wonder where it comes from exactly.
Another variation of this issue that I see:
In module A, refer to an identifier in module B. But that identifier doesn't exist in module B. The extension shows the error.
Go to module B and add the identifier.
Go back to module A. Until you make a change in module A, the extension still shows the error.

@nwolverson
Copy link
Owner

That is inherent in a model of compiling a single file at once, which is outside the scope of this extension (that is the domain of purs ide).

There's a question as to whether we should perform a compile on switching to a new file for this reason, but I'm minded to say no, it's easy enough to poke it (but see the other issue around continous feedback here nwolverson/purescript-language-server#53)

Please don't raise multiple things in 1 issue, the less specific an issue is the more likely it will be avoided or closed with only a partial fix.

@LucianU
Copy link
Author

LucianU commented Apr 4, 2019

Ok, I see. Sorry for muddying the waters. I thought the problems were related, that's why I mentioned the second behaviour. I can delete the comment if you wish, along with this one.

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

No branches or pull requests

2 participants