intellij-haskell icon indicating copy to clipboard operation
intellij-haskell copied to clipboard

Refractor -> rename doesn't change all occurences

Open DoctypeRosenthal opened this issue 3 years ago • 12 comments

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

DoctypeRosenthal avatar May 25 '21 10:05 DoctypeRosenthal

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

declension avatar Jul 16 '21 11:07 declension

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?

rikvdkleij avatar Aug 29 '21 14:08 rikvdkleij

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

DoctypeRosenthal avatar Aug 30 '21 11:08 DoctypeRosenthal

Something new on this one? Can I help maybe?

DoctypeRosenthal avatar Sep 19 '21 07:09 DoctypeRosenthal

@DoctypeRosenthal sorry, I still have to take another look

rikvdkleij avatar Sep 19 '21 16:09 rikvdkleij

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?

DoctypeRosenthal avatar Sep 19 '21 19:09 DoctypeRosenthal

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

rikvdkleij avatar Sep 19 '21 19:09 rikvdkleij

@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....

rikvdkleij avatar Sep 21 '21 19:09 rikvdkleij

Very strange and interesting!

DoctypeRosenthal avatar Sep 24 '21 05:09 DoctypeRosenthal

@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 avatar Oct 02 '21 14:10 rikvdkleij

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

rikvdkleij avatar Oct 02 '21 15:10 rikvdkleij

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

ZosoDerGoldene avatar May 12 '22 07:05 ZosoDerGoldene