Julia: now-silent deprecations that should be errors?

Created on 30 Apr 2020  路  7Comments  路  Source: JuliaLang/julia

Now that deprecations default to not warning, base/deprecated.jl could use some updates:

https://github.com/JuliaLang/julia/blob/2b871d428a2a91124e9e2/base/deprecated.jl#L175-L197

There's some stuff in there that was squeaky that will now be silent and should perhaps be converted into a hard error. There's other deprecations that can be added now that they won't warn by default. I'm opening the issue since I'm not entirely sure what to do about all of these.

cc @mbauman, @timholy, @JeffBezanson, @simonbyrne to whomst the blame is attributed

deprecation

Most helpful comment

For the things currently marked @deprecated --- reindex, substrides, RecursiveSpinLock, Mutex --- I think we can just delete those since they were never public APIs anyway and they have been noisy for a version or two.

All 7 comments

For the things currently marked @deprecated --- reindex, substrides, RecursiveSpinLock, Mutex --- I think we can just delete those since they were never public APIs anyway and they have been noisy for a version or two.

For one and MPFR.BigFloat, which were marked # TODO: deprecate, it looks like the intent was to @deprecate them once that was silent by default. That seems like the right thing to do, though it could make them mysteriously slower.

isimmutable --- technically should get a silent-by-default deprecation, but I would worry about performance quite a bit here.

@get! --- was never exported, so could be deleted. However, it has never been noisy either (the warning would have been added in 1.5), so we might want to change it to noisy-by-default, but we don't really have that option except by overriding the normal deprecation machinery.

promote_eltype_op --- delete

reindex and substrides are internal/undocumented functions with essentially no callers and were deprecated just to be nice. Can be deleted.

https://github.com/JuliaLang/julia/pull/30789/files#r249960750

From triage:
@get! - make it a normal warning
isimmutable - leave it alone
one, BigFloat - make normal deprecations

Was this page helpful?
0 / 5 - 0 ratings