Closed kbarros closed 9 months ago
I think this comes from misuse of @generated
functions; this sounds exactly like
Generated functions are only permitted to call functions that were defined before the definition of the generated function. (Failure to follow this may result in getting MethodErrors referring to functions from a future world-age.)
from https://docs.julialang.org/en/v1/manual/metaprogramming/#Generated-functions.
In particular, stable_type_id
on line 516 calls (eventually) cleanup_name
defined on line 530.
Looking further in the docs, it says:
Calling any function that is defined after the body of the generated function. This condition is relaxed for incrementally-loaded precompiled modules to allow calling any function in the module.
So I guess that is why it works when --compiled-modules=no
isn't present.
Could we just move around the definition?
Silly question, it does sound exactly like that issue. I made a pr and confirmed it locally: https://github.com/beacon-biosignals/StableHashTraits.jl/pull/39
Create a fresh Julia environment with StableHashTraits and CRC32c packages:
Execute from the REPL:
I get the following error on both Julia 1.9 and Julia 1.10-rc1:
This is a practical problem because it is blocking JuliaHub's documentation builds, which may depend on GLMakie. The former uses
--compiled-modules=no
, and the latter calls into StableHashTraits here: https://github.com/MakieOrg/Makie.jl/blob/822d11cf1e9751084a276f79b616b03afdc43e2d/src/bezier.jl#L112.