-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Implement refine imports #1686
Implement refine imports #1686
Conversation
plugins/hls-refine-imports-plugin/hls-refine-imports-plugin.cabal
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/hls-refine-imports-plugin.cabal
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/hls-refine-imports-plugin.cabal
Outdated
Show resolved
Hide resolved
🆒 |
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
plugins/hls-refine-imports-plugin/src/Ide/Plugin/RefineImports.hs
Outdated
Show resolved
Hide resolved
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.
stamped!
To run in CI the test suite needs to be added to https://github.com/haskell/haskell-language-server/blob/master/.github/workflows/test.yml |
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.
Let's add the test suite to CI before merging
nix jobs has failed with
rerunning the jobs just in case |
The Nix commit hooks were not pinned correctly and now they have broken. @Ailrun could you take a look? |
Sure, let me check that tomorrow. |
hooray! |
What is this?
A plugin which can refine the imports to use the underlying modules instead of the aggregated one.
For example, assuming there is a module A what it does is only importing and immediately exporting module B and module C, and there is a Main module importing A for a value which is defined in module B. This plugin can provide a click to change from import A to import B.
That is, from
to
Why?
One reason of long building time is because the unnecessary dependencies imported. In above example, module C is an unnecessary dependency.
This provides a fast way to cut down the size of dependencies.