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
Reject ambiguous module imports. #4495
Conversation
Filenames need to be unique per Nimble-package. And one test now fails with: module stdlib/system is already defined in /home/travis/build/nim-lang/Nim/lib/system.nim |
The way Nimble operates shouldn't, AFAIK, have any bearing on the compiler. The failing test relies on nimscript ( Not very knowledgeable about Nimble or Nimscript I confess. |
There we are. Done. |
Sorry, but this is convoluted and wrong (Nimscript can cause the reload any kind of module really, not only system.nim). Every skModule symbol has an skPackage owner, why not store the list of known modules in this skPackage and report if there is an ambiguity arising? |
I agree it's convoluted. Thanks for the pointer about Nimscript. That's important! Will open a new PR, as that fix will have little in common with this one. |
Sorry, I was a bit hasty with closing. Each Your point about Nimscript (and modules besides |
Any module can now be reloaded. I think we're okay now. |
Fixed it differently, sorry. :-) |
That's okay. Your fix 9eb909b is more comprehensive, and possibly more efficient too. |
Fixes #4485.