Skip to content

Option to disable import lens plugin #426

Closed
@AlistairB

Description

@AlistairB

The import lens plugin is cool, however I believe it is not always useful and has some negative impact.

Why not always specify exact import lists?

I think specific import lists (or qualified imports) is great when importing from dependent libraries that have a lot of exports in a specific module.

However, when developing boring business applications with a large domain, you often want to break it down into a lot of very specific small types in small modules. This gives more type safety and also reduces recompilation time.

When you have a lot of modules with one thing in it, specifying import lists becomes burdensome and is essentially just repeating yourself. eg. import MyApp.Model.Person (Person(Person)).

What are the downsides of the ignoring the plugin?

It creates a lot of visual noise

image

It takes time to load

It takes about 3 seconds to load which moves the code down.


If this is a reasonable / desirable change I'd be happy to attempt it if I could get pointers on how to make it.

I think the other alternative which might work for me is a way to apply the plugin on all imports in one go. That might make it worth it to just always have specific import lists. Or both of these could be done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions