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

deprecated_moved not working properly inside modules #24532

Closed
stevengj opened this issue Nov 8, 2017 · 1 comment · Fixed by #24540
Closed

deprecated_moved not working properly inside modules #24532

stevengj opened this issue Nov 8, 2017 · 1 comment · Fixed by #24540
Labels
deprecation This change introduces or involves a deprecation

Comments

@stevengj
Copy link
Member

stevengj commented Nov 8, 2017

(From JuliaMath/FFTW.jl#47, cc @EthanAnderes and @ararslan.) The @deprecate_moved macro in #22763 was supposed to allow the FFTW.jl module to replace the deprecated Base.FFTW module without hitting warnings. And indeed it works fine in Main:

julia> using FFTW   # loads FFTW.jl and replaces Base.FFTW

julia> FFTW.PATIENT
0x00000020

but inside a module it is not working:

ulia> module Foo
          using FFTW
          const foo = FFTW.PATIENT
      end
WARNING: both FFTW and Base export "FFTW"; uses of it in module Foo must be qualified
ERROR: UndefVarError: FFTW not defined

So, there is some aspect of symbol resolution that was missed in #22763.

cc @JeffBezanson

@stevengj stevengj added the deprecation This change introduces or involves a deprecation label Nov 8, 2017
@stevengj
Copy link
Member Author

stevengj commented Nov 8, 2017

The problem seems to be that the Base.DFT.FFTW itself is not marked as deprecated:

julia> Base.isdeprecated(Base.DFT, :fft)
true

julia> Base.isdeprecated(Base.DFT, :FFTW)
false

stevengj added a commit to stevengj/julia that referenced this issue Nov 8, 2017
ararslan pushed a commit that referenced this issue Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant