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

Implement refine imports #1686

Merged
merged 13 commits into from
Apr 30, 2021
Merged

Implement refine imports #1686

merged 13 commits into from
Apr 30, 2021

Conversation

rayshih
Copy link
Contributor

@rayshih rayshih commented Apr 7, 2021

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

module Main where

import A

to

module Main where

import B (b1)

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.

@isovector
Copy link
Collaborator

🆒

@rayshih rayshih requested a review from pepeiborra April 27, 2021 14:13
Copy link
Collaborator

@pepeiborra pepeiborra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stamped!

@pepeiborra
Copy link
Collaborator

Copy link
Collaborator

@pepeiborra pepeiborra left a 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

@rayshih rayshih requested a review from pepeiborra April 29, 2021 00:07
@jneira
Copy link
Member

jneira commented Apr 29, 2021

nix jobs has failed with

error: attribute 'run' missing, at /Users/runner/work/haskell-language-server/haskell-language-server/nix/default.nix:83:24
(use '--show-trace' to show detailed location information)
Error: Process completed with exit code 1.

rerunning the jobs just in case

@pepeiborra
Copy link
Collaborator

nix jobs has failed with

error: attribute 'run' missing, at /Users/runner/work/haskell-language-server/haskell-language-server/nix/default.nix:83:24
(use '--show-trace' to show detailed location information)
Error: Process completed with exit code 1.

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?

@Ailrun
Copy link
Member

Ailrun commented Apr 29, 2021

Sure, let me check that tomorrow.

@Ailrun Ailrun merged commit 54737e9 into haskell:master Apr 30, 2021
@rayshih
Copy link
Contributor Author

rayshih commented Apr 30, 2021

hooray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants