[1.12] `WARNING: using Foo in module Main conflicts with an existing identifier.` warnings gone
I'm sorry to duplicate this question in several places but I'm having a tough time getting an answer: in 1.12 it seems that in cases like
julia> x = 1
1
julia> module Foo
export x
x = 2
end
Main.Foo
julia> using .Foo
WARNING: using Foo.x in module Main conflicts with an existing identifier.
a warning is no longer emitted. I'm sure of course this is related to all the const redefinition stuff, but to me this seems like a UX regression as patterns like this are a common footgun and rarely intended. was this removal intentional? if not, could it be restored?
This never should have emitted a warning in any version, as that would have been a bug. Indeed, checking v1.8-v1.12 I don't see any warning accidentally present when testing that snippet.
sorry, I forgot the using .Foo in my MWE.
Okay, that for loop was removed in 888cf0350668a677ef27c87ab80a8562f3bc211e
yes --- and I am currently presuming (maybe incorrectly) that it was removed under the perspective of "this is no longer illegal." but from the perspective of user-friendliness, this does seem like the kind of place where a warning should be emitted. do you have any thoughts on re-adding the warning?
I don't think there is any intent to add back that loop, though someone could make a PR and force a decision before v1.12 releases
"not planned" is all good, I just was worried it was accidental. I suppose the manual does say
Technically, the statement using ModuleName means that a module called ModuleName will be available for resolving names as needed. When a global variable is encountered that has no definition in the current module, the system will search for it among variables exported by ModuleName and use it if it is found there.
which implies it may skip searching ModuleName if it finds the global already (without a warning)