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

"WARNING: replacing module..." is no longer printed when replacing modules #57810

Open
topolarity opened this issue Mar 17, 2025 · 2 comments
Open
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@topolarity
Copy link
Member

Not sure if this is intended as part of binding replacement or not, but wanted to open an issue just in case.

On nightly:

julia> module Foo; end
Main.Foo

julia> module Foo; end
Main.Foo

On 1.11:

julia> module Foo; end
Main.Foo

julia> module Foo; end
WARNING: replacing module Foo.
Main.Foo
@topolarity topolarity added the bug Indicates an unexpected problem or unintended behavior label Mar 17, 2025
@topolarity topolarity changed the title "WARNING: replacing module..." is no longer printed on nightly "WARNING: replacing module..." is no longer printed when replacing modules Mar 17, 2025
@Keno
Copy link
Member

Keno commented Mar 18, 2025

I removed the warning intentionally. This was UB before, so the warning was appropriate. Now this is just a special case of constant redefinition, which we never warn for.

@Keno
Copy link
Member

Keno commented Mar 18, 2025

That said, we should probably extend the world age printing to the module case as well:

julia> module Foo; end
Main.Foo

julia> oldFoo = Foo
Main.Foo

julia> module Foo; end
Main.Foo

julia> oldFoo
Main.Foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants