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

elm-format 0.7.0-exp incorrectly changes imports to make code not compile #11

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

newmana
Copy link
Contributor

@newmana newmana commented Mar 21, 2018

So 0.7.0-exp will remove two imports in src/Input/Number.elm:
import Html.Attributes exposing (style, type_)
import Html.Attributes as Attributes exposing (value)

And replaces them with:
import Html.Attributes as Attributes exposing (value, style, type_)

Which stops the code compiling.

The answer is to have one import:
import Html.Attributes as Attributes exposing (value, style, type_, min, max)

And changing the code on lines 156, 163, 231 and 238 (that use min and max).

This will survive 0.6.1-alpha and 0.7.0-exp reformatting.

My first commit is to show what 0.7.0 does and my second is to show the least change to the code (squash at will).

@newmana
Copy link
Contributor Author

newmana commented Mar 21, 2018

Related to elm-format issues like avh4/elm-format#445

@abadi199
Copy link
Owner

Wow, what a weird issue. I'm not sure why the import looked like that in the first place. Thanks for figuring it out 🥇

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.

2 participants