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

fix #23978, deprecation message for Base.Test #23983

Merged
merged 1 commit into from
Oct 5, 2017
Merged

Conversation

JeffBezanson
Copy link
Member

The binding deprecation mechanism is probably better for this case. After:

julia> using Base.Test
WARNING: Base.Test is deprecated, run `using Test` instead.
  likely near no file:0

julia> using Test

julia> @test true
Test Passed

To do this, I added a rule that if a deprecated binding has nothing as its value, then it's not actually imported, so it won't conflict with importing the replacement. I suppose we can revisit that if we ever need to deprecate a variable whose correct value is actually nothing...

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug deprecation This change introduces or involves a deprecation labels Oct 4, 2017
@KristofferC
Copy link
Member

Will @test true work after only using Base.Test?

@yuyichao
Copy link
Contributor

yuyichao commented Oct 4, 2017

It already doesn't.

@KristofferC
Copy link
Member

I know. Hence "will".

@JeffBezanson
Copy link
Member Author

No, it won't. I don't believe any deprecations automatically load code for you.

@KristofferC
Copy link
Member

Ok, my thought was that since this breaks 100% of packages, perhaps it would be worth to add a special case for a more smooth transition.

@martinholters
Copy link
Member

Most deprecations print a warning and do what they used to do. This one only prints a warning and does nothing else, which seems radically less useful. While for modules moved to an external package automatic loading in the deprecation looks dangerous indeed, in this case it does make sense IMHO.

@JeffBezanson
Copy link
Member Author

Most deprecations print a warning and do what they used to do.

Though none of the deprecations for moved code do that --- they all throw errors. But it's not too hard to add special cases for using these modules.

also automatically load packages moved from Base.X to stdlib
@JeffBezanson
Copy link
Member Author

Ok, now using or import of a Base.X package moved to stdlib will load it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants