Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,12 +842,15 @@ JL_DLLEXPORT jl_module_t *jl_get_module_of_binding(jl_module_t *m, jl_sym_t *var

static NOINLINE void print_backdate_admonition(jl_binding_t *b) JL_NOTSAFEPOINT
{
if (jl_options.depwarn == JL_OPTIONS_DEPWARN_ERROR)
jl_undefined_var_error(b->globalref->name, (jl_value_t*)b->globalref->mod);
jl_safe_printf(
Copy link
Member

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

Copy link
Member Author

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

"WARNING: Detected access to binding `%s.%s` in a world prior to its definition world.\n"
" Julia 1.12 has introduced more strict world age semantics for global bindings.\n"
" !!! This code may malfunction under Revise.\n"
" !!! This code will error in future versions of Julia.\n"
"Hint: Add an appropriate `invokelatest` around the access to this binding.\n",
"Hint: Add an appropriate `invokelatest` around the access to this binding.\n"
"To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.\n",
jl_symbol_name(b->globalref->mod->name), jl_symbol_name(b->globalref->name));
}

Expand Down