Skip to content

print_backdate_admonition may need a backtrace #57969

@timholy

Description

@timholy

The binding partitioning work introduced stricter rules for accessing globals, including a scary warning from

julia/src/module.c

Lines 775 to 784 in 13311f3

static NOINLINE void print_backdate_admonition(jl_binding_t *b) JL_NOTSAFEPOINT
{
jl_safe_printf(
"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",
jl_symbol_name(b->globalref->mod->name), jl_symbol_name(b->globalref->name));
}
My experience is that it's been quite difficult to pinpoint the problematic line without a backtrace. Another option would be to have an option to turn the warning into an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageThis should be discussed on a triage call

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions