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

conflicts caused by implicit using Base and importall Base.Operators #12183

Closed
JeffBezanson opened this issue Jul 16, 2015 · 5 comments
Closed

Comments

@JeffBezanson
Copy link
Sponsor Member

If a module M exports a name that's also exported by Base, using M leads to the new warning Warning: both M and Base export "sin"; uses of it in module Main must be qualified. This makes it very hard to make packages that override Base functions.

One workaround is to use import M.sin instead of using, however that fails for operators because of the implicit importall Base.Operators. You get for example Warning: ignoring conflicting import of M.+ into Main.

These warnings are great for usings and imports that are written explicitly, e.g. if you write import A.x; import B.x, but they're annoying in the case of the default imports.

Some mitigation ideas:

  • Remove the implicit importall Base.Operators
  • Allow other modules to silently override names brought in by the implicit using Base
@vtjnash
Copy link
Sponsor Member

vtjnash commented Jul 16, 2015

ref #8113

@mauro3
Copy link
Contributor

mauro3 commented Jul 18, 2015

Shouldn't it be the case that functions of Base should almost never be overridden? Overriding them silently seems bad. My vote goes to option one of the mitigation ideas.

@Sisyphuss
Copy link

3 questions:

  1. We made using the same functions drop both. Why we want to override the Base.function now?
  2. How does the import M.sin walk around?
  3. If Module A imports Module S, Module B imports Module S and Module A, what will happen?

@mauro3
Copy link
Contributor

mauro3 commented Aug 18, 2015

Not sure about answers to your questions. But this issue was resolved by #12235, I think.

@Sisyphuss
Copy link

These questions go beyond this issue. Knowing the answers to these questions will help the development in other situations.

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

No branches or pull requests

4 participants