-
-
Notifications
You must be signed in to change notification settings - Fork 391
Add ctor to import list code action broken with ghc 9.2 #2662
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
Labels
component: imports plugin
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Comments
I can reproduce in a unit test. I'll push an MR soon with the test. |
thanks for the bug report, I am a little bit surprised it has not been catch by an existing functional test |
guibou
added a commit
to guibou/haskell-language-server
that referenced
this issue
Jan 31, 2022
Repro pushed. Looks like the problem only happen for constructors. The test includes test for infix constructors, but it also fails for prefix constructors. edit: added test for prefix ctors. |
guibou
added a commit
to guibou/haskell-language-server
that referenced
this issue
Jan 31, 2022
They are failing because of haskell#2662.
mergify bot
pushed a commit
that referenced
this issue
Jan 31, 2022
* test: repro for #2662: extend import list miss separator * test: Add test for import list extension with prefix ctor * test: Mark failing test explicitly with GHC 9.2 They are failing because of #2662. * test: use knownBrokenForGhcVersions instead of ignoreForGHC92 The first one will fail once the test is fixed. Co-authored-by: Javier Neira <[email protected]>
guibou
added a commit
that referenced
this issue
Feb 8, 2022
The comma annotation was missing. Close #2662.
guibou
added a commit
that referenced
this issue
Feb 8, 2022
The comma annotation was missing. Close #2662.
mergify bot
added a commit
that referenced
this issue
Feb 9, 2022
* fix: handle comma in extend import list with ghc 9.2 The comma annotation was missing. Close #2662. * Update ghcide/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs Co-authored-by: Pepe Iborra <[email protected]> * refactor: extract addCommaInImportList Co-authored-by: Pepe Iborra <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: imports plugin
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Add to import list code action is broken with GHC 9.2, because it does not includes comma between symbols:
Your environment
Which OS do you use: Linux
Which LSP client (editor/plugin) do you use: Neovim + lsp_config
Describe your project (alternative: link to the project): standalone file
Steps to reproduce
Test with the following file:
Error should complain about
:|
not being in scope, and a code action should propose to add:|
to the import list ofData.List.NonEmpty
. You can execute the code action.Expected behaviour
Code action should change the import list to something valid, such as
(fromList, NonEmpty((:|)))
.Actual behaviour
Executing the code action changes the import list from
(fromList)
to(fromListNonEmpty((:|))
effectively missing the comma, generating a parse error.Include debug information
The text was updated successfully, but these errors were encountered: