-
Notifications
You must be signed in to change notification settings - Fork 112
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
Infer ranges #373
base: master
Are you sure you want to change the base?
Infer ranges #373
Conversation
@ndmitchell It looks like the copyright year is out of date in CI: https://github.com/ndmitchell/ghcid/actions/runs/4345680401/jobs/7590729342?pr=373#step:7:105 |
Thanks for the patch. Should GHC HQ be adding the range if they clearly know it? It seems a bit weird to parse it out of the string. Have you reported this upstream? I actually don't use the IDE extension anymore. So if you want to take over maintainership of this extension, you'd be most welcome to do so. |
Also, I wonder if this range inference should be in the Haskell side, if we do want to have it? |
Including the range info would be convenient for parsing, but on the other hand redundant with the annotation. I haven't reported this upstream since parsing makes it work on existing GHC versions. I've been using HLS more recently and I don't use the ghcid IDE features much anymore either, so I don't think I'd be a responsive maintainer.
Do you mean ghcid would read the GHC output, parse it, infer ranges, append the range info to errors, then print the augmented errors? I suppose the other plugins (nvim, emacs) would benefit from the info, too. |
Some GHC error messages have range info:
And some don't, but they have annotations:
This PR parses the
^^^
annotations to infer range info so that the red squiggles show up on the whole range in VS Code, not just the first character.In the process, I had to do some housekeeping: update TypeScript, mocha, migrate to
@vscode/test-electron
, etc.cc @ndmitchell