elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

Disallow `exposing (..)` in exposed modules for semver guarantees #61

Closed rtfeldman closed 8 years ago

rtfeldman commented 8 years ago

It is currently possible for a published package to break a build without undergoing a major version number bump, if it uses exposing (..) and one of its dependencies adds something that causes a namespace conflict.

A given package can prevent itself from causing namespace conflicts like this by never using "exposing (..)" in its imports. I tried doing that for a library in a case where I would normally use "exposing (..)" for the elm-html DSLs, and it was surprisingly little extra effort: https://github.com/NoRedInk/elm-html-widgets/blob/master/src/Accordion.elm

Elm could turn this practice into a guarantee by enforcing a rule like "if you have exposed modules, you must document all your exposed functions and you cannot use exposing (..) in your imports."

This was originally discussed on elm-dev, and discussion should continue there.

evancz commented 8 years ago

Tracked in #98

gampleman commented 8 years ago

Is that a private repo you are linking to? I get a 404 there...