-
-
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
Deprecate importall #22789
Comments
I believe most uses in Base are actually instances of re-exporting (#1986). Probably some are unnecessary, and some are undesirable and the modules should be more separated. |
We should possibly move Reexport.jl into Base. |
One issue I've found in writing the macro that would replace |
I think we can do without a macro replacement. I don't think there are any cases where |
Very much agree. |
Actually I guess the deprecation target for |
There is a use case for it - when you are trying to implement an interface defined in another package for a type that you created. People use this all the time with POMDPs.jl to make problem implementations cleaner (and we encourage it). Not saying that this decision is necessarily wrong, but I am sad to see it go. I guess we'll make our own macro that does it specifically for POMDPs.jl... |
It might make more sense to have an |
Here you go: ImportAll.jl I needed this for a remapping project. |
Thanks @NTimmons |
This keyword hasn't existed since before Julia 1.0 JuliaLang/julia#22789
This keyword hasn't existed since before Julia 1.0 JuliaLang/julia#22789
Simplest part of #8000.
This doesn't seem like it needs to be syntax, should be possible to implement as a macro instead, maybe even living in a package if Base can be made to not need it.
importall
is usually a code smell when used in packages - if a dependency adds an export that happens to use the same name that you were using for some previously-module-local function, then you'll start extending functions that you may not have meant to.By my count there are only 5 uses of this in Base other than in
sysimg.jl
. It might be desirable as we try to modularize and shrink Base to also rethink the 23 uses ofimportall
that are currently insysimg.jl
, to encourage using the submodules of Base explicitly, more like they were packages (which most of them should be) rather than all part of the flat top namespace of Base.The text was updated successfully, but these errors were encountered: