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

Error underlining doesn't update correctly #146

Closed
natefaubion opened this issue Jun 17, 2020 · 17 comments
Closed

Error underlining doesn't update correctly #146

natefaubion opened this issue Jun 17, 2020 · 17 comments

Comments

@natefaubion
Copy link

I noticed this started happening with the latest vscode 1.46.0.

error-position

@nwolverson
Copy link
Owner

Well that sounds like a vscode bug :(

@natefaubion
Copy link
Author

Hmm... I didn’t notice it in other languages, only PS. Maybe they are running on every key press though.

@natefaubion
Copy link
Author

FWIW found this old issue, but I don't know enough about the current implementation. microsoft/vscode#41299

@natefaubion
Copy link
Author

microsoft/vscode#90890 (comment) this ticket indicates that it is the responsibility of the extension to make sure squiggles track content changes.

@natefaubion
Copy link
Author

microsoft/vscode#102724 (comment) more current discussion.

@nwolverson
Copy link
Owner

Thanks, that looks to be exactly it. I always thought it was clever behaviour that VSCode did the right thing here, hopefully it can be restored somehow.

Possibly constantly rebuilding will be enough to make this nice again, we should have that option anyway, otherwise we get into the unfortunate situation of pushing diagnostic positions around to track text edits

@natefaubion
Copy link
Author

I'm not sure how that would work with purs ide, which still writes to output. I think it would be odd to write out externs for files that haven't been saved.

@nwolverson
Copy link
Owner

Good point, not sure where to go on that one - it's a feature requested some time ago nwolverson/purescript-language-server#53

Even using a temp file as the module source, I guess the output directory is the same. Maybe that's one to postpone for when the language server is integrated into purs ide ;)

@natefaubion
Copy link
Author

natefaubion commented Jul 31, 2020

I think purs-ide at the very least would just have to get an option to check a file, but not write out externs. It could potentially cache that result, and if it gets a subsequent request to check the file again (with no changes) but write externs, it can flush what it has. cc @kritzcreek

@natefaubion
Copy link
Author

microsoft/vscode#103953

@natefaubion
Copy link
Author

Looks like this will be reverted in the August milestone.

@nwolverson
Copy link
Owner

@natefaubion thanks for tracking this one, I hope it's not bugging you too much :)

@nwolverson
Copy link
Owner

Now in September milestone, tagged as 'feature request'

@natefaubion
Copy link
Author

Unfortunately, this is now backlogged.

@nwolverson
Copy link
Owner

At this point I may bother to have a crack at making the current behaviour less annoying. Given this is going to be a change in the language server it's probably worth trying to come up with some balance of irritation at too-few and too-wrong squiggles across a couple of editors (even though if the spec is unclear vscode is no doubt the defacto driver of what to do)

@nwolverson
Copy link
Owner

@natefaubion I just looked into those issues again, while the latest of the issues you linked is unresolved, I believe the commit that stopped squiggles moving around as you edit was reverted way back when: microsoft/vscode@85304e3

And having tested (and indeed not noticed the issue in general usage), I think we're back to the original situation, squiggles will move down if you insert newlines before a warning, for example (but the problems view reports the original, now incorrect, line numbers). If you edit/delete the offending text then sure, you'll end up with a persistant empty squiggle, but not the behaviour you show above.

@natefaubion
Copy link
Author

Ah yeah, this has been working for a while. Forgot to close this 😄

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

No branches or pull requests

2 participants