-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a deprecate_stdlib macro that binds to the right functions #25692
Conversation
base/deprecated.jl
Outdated
@eval @deprecate_moved $(Symbol("@sprintf")) "Printf" true true | ||
|
||
# PR #21709 | ||
@deprecate cov(x::AbstractVector, corrected::Bool) cov(x, corrected=corrected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below was certainly not planned to be removed
58803f6
to
fc01c4d
Compare
Ok this is good to go from my side. |
base/bitarray.jl
Outdated
@@ -431,7 +431,7 @@ end | |||
|
|||
function copyto!(dest::BitArray, src::Array) | |||
length(src) > length(dest) && throw(BoundsError(dest, length(dest)+1)) | |||
length(src) == 0 && return det | |||
length(src) == 0 && return dest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sneaky... I will split this out and make a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@code_warntype copyto!(BitArray([true]), [1])
....
end::Union{typeof(Base.det), BitArray{1}}
lol...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now understand how Jameson found this:
WARNING: Base.det is deprecated: it has been moved to the standard library package `LinearAlgebra`.
Add a `using LinearAlgebra` to your imports..
in module Base
in copyto! at bitarray.jl
152343a
to
e463b6b
Compare
Absent any further objections I plan to merge this this evening (EST) |
- New `deprecate_stdlib` macro that adds user friendly deprecation for bindings that have been moved to the stdlib, but are still in the sysimage. - Simplify `deprecate_moved` macro. - add deprecation for BLAS submodule Also-by: Jameson Nash <[email protected]>
e463b6b
to
cf729a1
Compare
The long anticipated followup to #24843. Since we actually have the stdlib modules in the sysimage
we can deprecate correctly and still point to the right functions.
Turns
into:
This still leads to: