Deprecate keyword argument

I just made a package for doing this here: GitHub - MilesCranmer/DeprecateKeywords.jl: Macro for deprecating keyword parameters

Described in this thread: Standard way to deprecate a keyword argument

using DeprecateKeywords

@deprecate_kws function foo(;
    new_kw1=2,
    new_kw2=3,
    @deprecate(old_kw1, new_kw1),
    @deprecate(old_kw2, new_kw2)
)
    new_kw1 + new_kw2
end
2 Likes