# How to deprecate a change in exported names

**URL:** https://discourse.julialang.org/t/how-to-deprecate-a-change-in-exported-names/7257
**Category:** Internals & Design
**Created:** [November 22, 2017, 9:13pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-change-in-exported-names/7257 "2017-11-22T21:13:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)
#### Post date: [November 22, 2017, 9:13pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-change-in-exported-names/7257/1 "2017-11-22T21:13:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [November 22, 2017, 9:34pm UTC](https://discourse.julialang.org/t/how-to-deprecate-a-change-in-exported-names/7257/2 "2017-11-22T21:34:00Z")

</div>

Maybe:

```julia
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

```
