rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.32k stars 94 forks source link

Refractor -> rename doesn't change all occurences #657

Open DoctypeRosenthal opened 3 years ago

DoctypeRosenthal commented 3 years ago

See gif for description : Bildschirmaufnahme 2021-05-24 um 15 07 30

Originally posted by @DoctypeRosenthal in https://github.com/rikvdkleij/intellij-haskell/issues/536#issuecomment-847033714

declension commented 3 years ago

I'm always running into this issue, thanks for filing :)

rikvdkleij commented 3 years ago

I've tried to reproduce this issue with similar code but I can't.

Can you give the complete code example and is the function exposed?

DoctypeRosenthal commented 3 years ago

@rikvdkleij sure https://github.com/DoctypeRosenthal/learn_haskell_homeworks/blob/master/Homework4/Main.hs#L43

DoctypeRosenthal commented 3 years ago

Something new on this one? Can I help maybe?

rikvdkleij commented 3 years ago

@DoctypeRosenthal sorry, I still have to take another look

DoctypeRosenthal commented 3 years ago

No problem. I have no clue of Scala but it might be because in https://github.com/rikvdkleij/intellij-haskell/blob/master/src/main/scala/intellij/haskell/refactor/HaskellRenameVariableProcessor.scala#L40 you tell IntelliJ to invalidate definitions too early? Or maybe the plugin doesn't build references to all pattern match implementations of the same function?

rikvdkleij commented 3 years ago

In general it works so it must be some corner case.

rikvdkleij commented 3 years ago

@DoctypeRosenthal FYI, I can reproduce the issue in your case but I don't have any clue how to fix this. Even when I disable the cache completely it still doesn't work. Need to investigate more....

DoctypeRosenthal commented 3 years ago

Very strange and interesting!

rikvdkleij commented 3 years ago

@DoctypeRosenthal it's getting weirder :smile: , I can't reproduce the issue again anymore. Maybe it's an IntelliJ issue...

I will release a new version and let's see.

rikvdkleij commented 3 years ago

Released beta88, https://github.com/rikvdkleij/intellij-haskell/releases/tag/v1.0.0-beta88

ZosoDerGoldene commented 2 years ago

I'm using beta88, and I still run into the issue all the time