-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add @compat for standard library imports #403
Conversation
4ccbeec
to
7ed229e
Compare
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.
This should be done with module aliases instead of syntax rewrite. The user should write using Compat.Test
etc.
test/runtests.jl
Outdated
# 0.7 | ||
module Test23876 | ||
using Compat | ||
@compat importall Test |
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.
Also importall
is being deprecated
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.
ok, I'll avoid rewriting importall
then
Module aliasing would force loading all the standard library modules as soon as Compatible loads, however. |
They are anyway. |
Even so, module aliasing here introduces parts of Compat that will eventually need to be deprecated and migrated again, whereas the syntax rewriting can be removed later without deprecation. |
Alternatively, we could consider registering stub modules |
Yes? What's the problem? It doesn't change the fact that syntax rewrite is always the least preferred way to handle version compatibility, especially for a non-syntax change.
That can also work. |
I agree in principle, but it just seems more elegant to be able to do |
Replaced by #404. |
Alternative to #404.
See JuliaLang/julia#23931.
The
SharedArrays
module is emulated instead of real.