Skip to content

Commit bfd9335

Browse files
committed
Add documentation about deprecation process
Cf. #10612
1 parent 04051e9 commit bfd9335

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

base/deprecated.jl

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
# This file is a part of Julia. License is MIT: http://julialang.org/license
2+
#
3+
# Deprecated functions and objects
4+
#
5+
# Please add new deprecations at the bottom of the file.
6+
# A function deprecated in a release will be removed in the next one.
7+
# Please also add a reference to the pull request which introduced the
8+
# deprecation.
9+
#
10+
# For simple cases where a direct replacement is available, use @deprecate:
11+
# the first argument is the signature of the deprecated method, the second one
12+
# is the call which replaces it. Remove the definition of the deprecated method
13+
# and unexport it, as @deprecate takes care of calling the replacement
14+
# and of exporting the function.
15+
#
16+
# For more complex cases, move the body of the deprecated method in this file,
17+
# and call depwarn() directly from inside it. The symbol depwarn() expects is
18+
# the name of the function, which is used to ensure that the deprecation warning
19+
# is only printed the first time for each call place.
220

321
macro deprecate(old,new)
422
meta = Expr(:meta, :noinline)

0 commit comments

Comments
 (0)