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

Quick Fix (VSCode) No Longer Showing Fix Options #4012

Closed
theGhostJW opened this issue Jan 23, 2024 · 7 comments
Closed

Quick Fix (VSCode) No Longer Showing Fix Options #4012

theGhostJW opened this issue Jan 23, 2024 · 7 comments
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@theGhostJW
Copy link

theGhostJW commented Jan 23, 2024

Your environment

Which OS do you use?
Ubuntu (Windows WSL)

Which version of GHC do you use and how did you install it?
cabal: 3.10.2.1
ghc: 9.8.1

Which LSP client (editor/plugin) do you use?
vscode-haskell

Which version of HLS do you use and how did you install it?
2.6.0.0 via ghcUp

Have you configured HLS in any way (especially: a hie.yaml file)?
No

Summary

Previously, when there is a hint or error, quick fix options have been provided in VSCode (e.g. to use a correct variable name or update imports), and these could be applied automatically by selecting one of those options.

Now the only options provided are either to turn off the error via a pragma or copilot related fixes. I have tried disabling copilot and confirmed this does not fix the issue. Also, the suggested code action is provided in the hint.

I have double checked my HLS options selected in VS code and all the related code action / plugin options are checked.

Steps to reproduce

  1. slightly change a variable name to be incorrect

  2. hover over the error

  3. => note the suggested fix:

    image

  4. invoke Quick Fix

  5. => no related fix option is given

image

Expected behaviour

Fix option should be provided

@theGhostJW theGhostJW added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jan 23, 2024
@michaelpj
Copy link
Collaborator

HLS relies on GHC's diagnostics to power code actions, if you change the diagnostics that GHC emits we may not function the same. In particular, it looks like you have -fdeferred-out-of-scope-variables set, which is going to change the errors that GHC emits. Maybe we don't handle those correctly. Do the code actions come back if you stop setting that flag?

@wz1000
Copy link
Collaborator

wz1000 commented Jan 24, 2024

we set -fdeferred-out-of-scope-variables in HLS.

I think this is just hls-refactor-plugin not being available for GHC 9.8 in 2.6.0.0

@michaelpj
Copy link
Collaborator

Good spot, that would do it.

@michaelpj
Copy link
Collaborator

Okay, I'm going to close this as expected behaviour then.

@michaelpj michaelpj closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2024
@theGhostJW
Copy link
Author

OK thanks. Hope to see it become available a future release.

@Bodigrim
Copy link
Contributor

@michaelpj @wz1000 is there an issue tracking hls-refactor-plugin with GHC 9.8? It seems to build fine, no?

@wz1000
Copy link
Collaborator

wz1000 commented Jan 28, 2024

It will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants