-
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
Package name collisions #1043
Comments
Perhaps your local application should have a separate namespace for all local modules? |
Not a bad idea, but as noted, there's already a known solution for the case where I have the ability to rename. I wanted to raise the issue because I believe currently if this happens at the package level, I have no recourse - which means some packages just fundamentally cannot be used together in the same module due to namespace conflicts. That seems like a use case worth supporting in general, yeah? (For what it's worth, it's not clear that this should be an |
There's an old proposal of mine that was closed that spoke about this issue: #935 It was closed because this was a problem I had anticipated but no one had actually ever run into it, until now. Perhaps it would be valuable to re-open that issue in order to gather ideas on how best to support multiple packages with the same name. |
This is not blocking us, because one of the modules is local, so I'm not sure if this satisfies "people have run into this." I'll leave it open I suppose. |
Fixing #826 will lay the groundwork for this. In 0.15.1 we could add syntax for this, but the infrastructure is not there to do the right thing. In the latest master branch, we are pretty much done with #826 so this should just be a matter of figuring out syntax soon. Can we close this issue and make a new one that:
Haskell seems to do okay putting a namespace in the module name. I get why that's dumb, but I don't yet get what's dumb about the alternative in practice and would like to be able to compare them fairly. I don't want opinions on this; I think it'd be way more productive to see examples, play through scenarios, and learn from people with experience with systems we have not used extensively. |
Yep! Will do. Closing now; will make the other issue soon. |
As this is one of the first results when searching for this issue, and because multiple threads mention "waiting to see who runs into this", and because I can't find a more approriate follow-up issue: I encountered this issue running through the Elm Guide. In particular I've been going through it 'manually', creating files in my editor from scratch and naming them based on the section. All was well through
This occurs due to an (edit) To be clear I've currently changed the file name so I can keep on going, but I had expected there to be some way of importing a fully qualified package matching the dependency specification, such as |
We recently tried to import the
Validate
module fromrtfeldman/elm-validate
into a module that already imported an internal module namedValidate
. I was hopeful that this would work to disambiguate......but instead it was a syntax error.
In this case we can just rename our local module, but that wouldn't work if the conflict were between two third-party packages, both of which exposed a module with the same name.
Is there a plan for how to resolve that?
The text was updated successfully, but these errors were encountered: