-
Notifications
You must be signed in to change notification settings - Fork 662
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
Module name collision in generated code #826
Comments
I just ran into a module name collision. I'm using rluiten/elm-date-extra in an hour reporting app I'm writing. Then I needed some UI components and decided to bring in Elm-UI. Unfortunately this doesn't work, as Elm-UI depends on mgold/elm-date-format, and both
|
Whoo, resolved in 0.17! |
how can use it? |
To clarify, the initial issue was that if two packages have private modules with the same name, it used to cause problems. So if package @joaalto posted about a separate issue, thinking this was tracking what he was worried about. That happens, and that is why I recommend always opening a new issue rather than piling on things that you think are your problem. |
As it is, each module is attached to Elm according to its name, so
Search.View
becomesElm.Search.View
.This becomes problematic when there are many packages involved that may have modules with the same names. For example, if there's a private
Utils
module inevancz/focus
and inevancz/automaton
, the module that wins at runtime depends on what order things were compiled.The solution is to use fully qualified names in generated code, so
Utils
would beElm.evancz.focus.Utils
or something like that.The text was updated successfully, but these errors were encountered: