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

Renaming a record data constructor also renames record fields #4358

Closed
Innf107 opened this issue Jul 11, 2024 · 1 comment
Closed

Renaming a record data constructor also renames record fields #4358

Innf107 opened this issue Jul 11, 2024 · 1 comment
Labels
status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Innf107
Copy link

Innf107 commented Jul 11, 2024

Your environment

Which OS do you use? Arch Linux

Which version of GHC do you use and how did you install it? GHC 9.4.7 via stack

How is your project built (alternative: link to the project)? stack (https://github.com/Innf107/vega)

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

Which version of HLS do you use and how did you install it? 2.4.0.0, automatically installed by vscode-haskell

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

Steps to reproduce

Define a record and try to rename the constructor like this: https://www.youtube.com/watch?v=VO_1D_cThv8

I tried to reproduce this with a more recent HLS version with plain GHC or cabal but I couldn't get that one to support renaming anything at all. Pressing enter after renaming would just not do anything and not print anything in the logs.

Debug information

The logs include

[Error - 5:45:34 PM] Request textDocument/foldingRange failed.
  Message: codeRange: Rule Failed: GetCodeRange
  Code: -32803 

when I try to rename the identifier

@Innf107 Innf107 added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jul 11, 2024
@fendor
Copy link
Collaborator

fendor commented Jul 11, 2024

Hi, thank you for your bug report!

This is indeed quite annoying and we have an existing issue #2915.
A potential fix is on the way, see #4089.

Closing as a duplicate, but feel free to reopen if you think I missed some details.

@fendor fendor closed this as completed Jul 11, 2024
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

2 participants