GameZero.jl icon indicating copy to clipboard operation
GameZero.jl copied to clipboard

Julia 1.12 compatibility

Open jwortmann opened this issue 3 months ago • 0 comments

Hello, it seems that GameZero is not compatible with Julia 1.12.

For example when copying the files from the /example/BasicGame folder from this repository, I get the following warnings in the REPL and the window stays completely white:

julia> rungame("D:\\code\\Julia\\GameZeroTest\\BasicGame\\basic.jl")
WARNING: Detected access to binding `Basic_qP5Ph.update` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Basic_qP5Ph.on_key_down` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.

This happens even when using the latest commit version from this repository:

pkg> add GameZero#6e91b012c778317dd77ee742c44f476e00c76b2b

pkg> add Colors

Starting Julia with --depwarn=error as suggested in the warning message doesn't print any stacktrace.

I use GameZero as a dependency in my package Eternity2Puzzles.jl and get a similar warning as shown above.

julia> using Eternity2Puzzles

julia> play()
WARNING: Detected access to binding `Eternity2_XFaED.on_key_down` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Eternity2_XFaED.on_mouse_up` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Eternity2_XFaED.on_mouse_down` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Eternity2_XFaED.on_mouse_move` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Eternity2_XFaED.HEIGHT` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Eternity2_XFaED.WIDTH` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Eternity2_XFaED.BACKGROUND` 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.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.

jwortmann avatar Oct 08 '25 21:10 jwortmann