Expose `Base.depwarn(...; force=false)` in `@deprecate`

Following up on the conversation in Why is `depwarn=no` by default? Would it be possible to expose the force kwarg of Base.depwarn in the @deprecate call? I just opened a PR in DeprecateKeywords.jl that uses the following syntax to do something similar there:

@depkws force=true function f(; a=2, @deprecate(b, a))
    a
end

The first argument here is optional (defaulting to false) and can be any expression that evaluates to a Boolean, including an assignment expression.

Could something similar be done with @deprecate? I expect my package to mostly be used by end users rather than incorporated into the dependencies of another package, and so I want to be able to communicate directly to endusers about the expected future state of the API.

1 Like