Skip to content

(spurious?) global binding world age warning involving function that returns a huge tuple #57301

@nsajko

Description

@nsajko

EDIT: see simpler reproducer below

julia> for i  1:100
           n = 2^i
           @eval g() = ntuple(Returns(nothing), Val($n))
           eff = Base.infer_effects(g, Tuple{})
           display(eff)
       end
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
(+c,+e,+n,+t,+s,+m,+u,+o,+r)
WARNING: Detected access to binding `Base.string` in a world prior to its definition world.
  Julia 1.12 has introduced more strict world age semantics for global bindings.
  !!! This code may malfunction under Revise.
  !!! This code will error in future versions of Julia.
Hint: Add an appropriate `invokelatest` around the access to this binding.
(!c,+e,!n,!t,+s,+m,!u,+o,+r)
(!c,+e,!n,!t,+s,+m,!u,+o,+r)
(!c,+e,!n,!t,+s,+m,!u,+o,+r)
[...]

@Keno

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inference

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions