-
-
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
Depwarns at global scope have incorrect caller #25130
Comments
I think this is more a stack sanitization issue for stack frames coming from the REPL. In normal functions, julia> foo() = Array(Int,1)
foo (generic function with 2 methods)
julia> foo()
W- `Array(::Type{T}, m::Int) where T` is deprecated, use `Array{T}(uninitialized, m)` instead. -Warn:Main:REPL[2]:1
| caller = foo() at REPL[2]:1
1-element Array{Int64,1}:
-1 |
An alternative to simply attaching As a bit of extra context for what I've been thinking here for future functionality - the |
Maybe we just need a special case for calls done in the global scope? |
Oh, I see - this issue is worse than I thought as it applies to all code at global scope, not just the REPL. Would you mind changing the title to something like "Depwarns at global scope have incorrect caller" I'm sure this can be fixed. Possibly with a special case but I'll need to dig. |
It's not just global scope(?): julia> f() = warn("foo")
f (generic function with 1 method)
julia> f()
W- `warn()` is deprecated, use `@warn` instead. -Warn:Core:julia_internal.h:380
| caller = jl_call_fptr_internal at julia_internal.h:380 [inlined]
WARNING: foo |
Yep, this is serious. I think I have a simple fix, just figuring out how to test it. |
This will make it quite hard to identify where deprecations come from:
The text was updated successfully, but these errors were encountered: