-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
New rename plugin implementation #2108
New rename plugin implementation #2108
Conversation
project structure initial test cases directly modify source to rename references
support ghc9 revert retrie version bump disable feature by default
remove unnecessary flag in test.yml consistent indentation increase retrie version for ghc 9.0.1 (decreased by mistake)
…erMadine/haskell-language-server into rename-plugin-directly-parse-source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to go with only minor comments!
What is the performance of this plugin like on a big project? |
As a rough approximation, renaming 221 occurrences of the |
How does it compare to the retrie version of the plugin? |
fix typo in indentation test break lines at 100 chars rename some vars
remove Retire dependency by using exactprint directly group references by file to increase speed of checking `elem` per file add test cases (typeclass, let expression) add some documentation fix bug when looking up reference in HieDb improve error messages rename some function / vars
…ver into rename-plugin-directly-parse-source
This version actually seems much faster; the Retrie version was taking over 1 min for this rename. Maybe there was a bug or some overhead from calling Retrie individually for each file on that branch. |
This is merged. Congratulations @OliverMadine on landing the first version of the rename plugin! |
I am not able to see the demo in my firefox, @OliverMadine could you attach a demo in gif format to add to ChangeLog and other docs? thanks! |
@jneira Here you go. |
Unfortunately it is still disabled (#2193) :( You can enable it for use on a single component projects by building the HLS with Also, note: once it is enabled you can use it through the rename command. It is not a code action. |
Has this been merged into the release builds? |
A new PR for my GSoC rename plugin since I'm changing my approach to the solution.
After spending some time implementing a solution with Retrie, I've realised it would be better just to modify the source directly (using SYB).
The advantages are:
I am leaving the plugin disabled by default since we still need all relevant files to be indexed to ensure correctness.
The work towards a full solution to this has been started, however, if we get #2009 merged, then I can look into making a temporary solution (by assuming the
hie.yaml
lists all components).Example
Renaming 221 occurrences of the
IdeState
data type in HLS.HLS rebuilt successfully after this rename!
Closes #282.