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

Misleading deprecation advice #8

Closed
jarvist opened this issue May 11, 2017 · 2 comments
Closed

Misleading deprecation advice #8

jarvist opened this issue May 11, 2017 · 2 comments

Comments

@jarvist
Copy link

jarvist commented May 11, 2017

When you follow the deprecation advice for using this package on Julia 0.6 and beyond,

julia> quadgk()
ERROR: quadgk() has been moved to the package QuadGK.jl.
Run Pkg.add("QuadGK") to install QuadGK on Julia v0.6 and later, and then run `using QuadGK`.

It does not actually work due to a clash with the deprecation warning itself.

julia> using QuadGK
julia> quadgk()
WARNING: both QuadGK and Base export "quadgk"; uses of it in module Main must be qualified
ERROR: UndefVarError: quadgk not defined

I believe the above was working on MASTER sometime over Winter 2016 / Spring 2017, as I had added using QuadGK to all my codes to make the deprecation warning go away!

Instead you must import the function(s) you want explicitly,

julia> import QuadGK.quadgk
julia> quadgk
quadgk (generic function with 3 methods)

Or reference the QuadGK package every time you call the function,

julia> using QuadGK
julia> QuadGK.quadgk
quadgk (generic function with 3 methods)

See also discussion at:
JuliaLang/julia#19741

Can the QuadGK functions be forcibly exported into the namespace when the packaged is using'd ? That would seem to be the expected behaviour by the user.

@stevengj
Copy link
Member

No. I don't think this is something that can be fixed in QuadGK.jl

@ararslan
Copy link
Member

ararslan commented May 11, 2017

I think it can be fixed here with some choice importing, as was done with Primes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants