How to deprecate a change in exported names

if a module used to export a method, and a breaking change is made such that it doesn’t anymore, is there anyway to deprecate it? thanks.

Maybe:

julia> module Foo
           @deprecate exported() Foo.unexported()
           unexported() = println("Not exported")
       end
Foo

julia> using Foo

julia> exported()
WARNING: exported() is deprecated, use Foo.unexported() instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 [2] exported() at ./deprecated.jl:57
 [3] eval(::Module, ::Any) at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 [4] eval_user_input(::Any, ::Base.REPL.REPLBackend) at /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 [5] macro expansion at ./REPL.jl:97 [inlined]
 [6] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading no file, in expression starting on line 0
Not exported
2 Likes