-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: warn and don't import when two usings
provide the same name
#10951
Conversation
Awesome. |
I'm a fan. |
What happens with:
? |
You get |
+1
|
I'm all for just merging this. |
+1 On Thursday, April 23, 2015, Stefan Karpinski [email protected]
|
RFC: warn and don't import when two `usings` provide the same name
Great! Remember the NEWS.md and docs. |
While I think this is a good idea, it breaks Gadfly since it, as well as Base, export something called |
Yes I think we can remove that. We'll probably remove all the 0.3 deprecations pretty soon. |
Interesting examples of breakages:
http://pkg.julialang.org/?pkg=Calculus&ver=nightly
|
More worryingly:
|
if (owner != NULL && tempb->owner != b->owner && | ||
!(tempb->constp && tempb->value && b->constp && b->value == tempb->value)) { | ||
jl_printf(JL_STDERR, | ||
"Warning: both %s and %s export %s; uses of it in module %s must be qualified\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the examples posted from PkgEvaluator, some quotation marks here might aid readability?
"Warning: both `%s` and `%s` export `%s`; ..."
The ones for the modules are less needed, but setting off the method name seems like it would make this a tad easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that'd be a nice little change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So apparently that option to "create a pull request" in the GitHub editor doesn't actually work. Nice. ec99e37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow I had no idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what? It just makes the change instead of creating a PR? That's broken and dangerous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's an incredibly bad bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intend to reproduce it + file a report with them when I get home, if no one beats me to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And failed to reproduce. Blargh. Sorry, either I misclicked or it's specific to the Firefox (or profile, or cookies, or...) at the office.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So apparently that option to "create a pull request" in the GitHub editor doesn't actually work. Nice. ec99e37
if you have direct rights to a repo, it'll let you edit any file directly in the browser. it can be very useful for doc and README changes, but generally not so good for code edits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm aware; I've fixed doc typos that way before.
GitHub appears to have recently added the ability to make a branch & pull request instead, which is what I tried to do precisely because it was a code change. It's a radio button option that appears in the edit window below the commit message box. It worked fine the second time I tried it, so I'm not sure what happened the first time.
This is a bit annoying: julia> using Base.Libdl
julia> dlopen
Warning: both `Libdl` and `Base` export `dlopen`; uses of it in module `Main` must be qualified
ERROR: UndefVarError: dlopen not defined (The |
from JuliaPackaging/BinDeps.jl#143 (comment)
|
Unless I messed up, I believe I already implemented that. However |
fixes #4345
Does the following:
importall
is a bit of a different story. It's hard to provide the same behavior there, since it's an imperative: the names are imported right when the importall statement runs. Fortunately it's used far less often thanusing
, and we already give a warning for conflicts in that case.Will update news and docs if this is to be merged.