avh4 / avh4/elm-format

breaks compile by removing non-redundant imports

Open
#445 4 comments 1 reaction 0 assignees View on GitHub
discussion
Dominant language
Haskell
Stars
1.3k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

I have imports

import Svg
import Svg.Attributes as Svg
import Svg.Attributes

and access most attributes as `Svg.`. But both `Svg` and `Svg.Attributes` define `style`, so I need the third import to be able to access `Svg.Attributes.Style` explicitly. `elm-format` however removes that import statement, converting compiling elm code to non-compiling elm-code.

(Yes, that import situation is a bit messy; it seems that the real `Svg.style` isn't accessible at all anymore.)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the three-import Elm example from the issue and compare elm-format's output with the compiler result. Trace the import-formatting behavior responsible for removing the explicit Svg.Attributes import, and consider the issue done when the formatted example still compiles and preserves the needed import.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm, haskell
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.