-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
add backdate_admonition to depwarn=error #58266
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
Conversation
I think a majority of our users don't know |
tests run with depwarn by default in Pkg |
Isn't that I think it would save users a lot of trouble if the warning took a short backtrace and reported the file + line number from the first frame |
Related: #48282 |
{ | ||
if (jl_options.depwarn == JL_OPTIONS_DEPWARN_ERROR) | ||
jl_undefined_var_error(b->globalref->name, (jl_value_t*)b->globalref->mod); | ||
jl_safe_printf( |
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.
Should maybe mention --depwarn=error
in this warning so that people know how to turn it on
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.
Good point. I'll steal the message from Vararg{T} where T
This is close to the expected behavior after deprecations are removed (other than that the b->globalref->mod in the printed message here will be the source module instead of the destination module, which may sometimes cause confusing printing here, but probably rarely). Closes #57969
This is close to the expected behavior after deprecations are removed (other than that the b->globalref->mod in the printed message here will be the source module instead of the destination module, which may sometimes cause confusing printing here, but probably rarely). I also needed this recently to find a place this warning occurred, so I think it should be merged now and get feedback later. Closes #57969 (cherry picked from commit 0682158)
This is close to the expected behavior after deprecations are removed (other than that the b->globalref->mod in the printed message here will be the source module instead of the destination module, which may sometimes cause confusing printing here, but probably rarely). I also needed this recently to find a place this warning occurred, so I think it should be merged now and get feedback later. Closes JuliaLang#57969
This makes two changes to the backdate-warning-turned-error (#58266): 1. Fix a bug where the error would only trigger the first time. We do only want to print once per process, but of course, we do want to error every time if enabled. 2. If we are in speculative execution context (generators and speculatively run functions during inference), always use the UndefVarError. Effects from these functions are not supposed to be observable, and it's very confusing if the printed warning goes away when depwarns are enabled. This is marginally more breaking, but the burden is on generated function authors (which already have to be world-age aware and are somewhat more regularly broken) and is consistent with other things that are stronger errors in pure context. Fixes #58648
This makes two changes to the backdate-warning-turned-error (#58266): 1. Fix a bug where the error would only trigger the first time. We do only want to print once per process, but of course, we do want to error every time if enabled. 2. If we are in speculative execution context (generators and speculatively run functions during inference), always use the UndefVarError. Effects from these functions are not supposed to be observable, and it's very confusing if the printed warning goes away when depwarns are enabled. This is marginally more breaking, but the burden is on generated function authors (which already have to be world-age aware and are somewhat more regularly broken) and is consistent with other things that are stronger errors in pure context. Fixes #58648
This makes two changes to the backdate-warning-turned-error (#58266): 1. Fix a bug where the error would only trigger the first time. We do only want to print once per process, but of course, we do want to error every time if enabled. 2. If we are in speculative execution context (generators and speculatively run functions during inference), always use the UndefVarError. Effects from these functions are not supposed to be observable, and it's very confusing if the printed warning goes away when depwarns are enabled. This is marginally more breaking, but the burden is on generated function authors (which already have to be world-age aware and are somewhat more regularly broken) and is consistent with other things that are stronger errors in pure context. Fixes #58648
This makes two changes to the backdate-warning-turned-error (#58266): 1. Fix a bug where the error would only trigger the first time. We do only want to print once per process, but of course, we do want to error every time if enabled. 2. If we are in speculative execution context (generators and speculatively run functions during inference), always use the UndefVarError. Effects from these functions are not supposed to be observable, and it's very confusing if the printed warning goes away when depwarns are enabled. This is marginally more breaking, but the burden is on generated function authors (which already have to be world-age aware and are somewhat more regularly broken) and is consistent with other things that are stronger errors in pure context. Fixes #58648 (cherry picked from commit d2cc061)
This makes two changes to the backdate-warning-turned-error (JuliaLang#58266): 1. Fix a bug where the error would only trigger the first time. We do only want to print once per process, but of course, we do want to error every time if enabled. 2. If we are in speculative execution context (generators and speculatively run functions during inference), always use the UndefVarError. Effects from these functions are not supposed to be observable, and it's very confusing if the printed warning goes away when depwarns are enabled. This is marginally more breaking, but the burden is on generated function authors (which already have to be world-age aware and are somewhat more regularly broken) and is consistent with other things that are stronger errors in pure context. Fixes JuliaLang#58648
This is close to the expected behavior after deprecations are removed (other than that the b->globalref->mod in the printed message here will be the source module instead of the destination module, which may sometimes cause confusing printing here, but probably rarely). I also needed this recently to find a place this warning occurred, so I think it should be merged now and get feedback later.
Closes #57969