tlienart / Xranklin.jl

Experimental repo for a refactoring of Franklin.jl
https://tlienart.github.io/Xranklin.jl
MIT License
40 stars 1 forks source link

World age error while building site #278

Open jacobusmmsmit opened 4 months ago

jacobusmmsmit commented 4 months ago

I have this code example for ModernJuliaWorkflows.

using StaticArrays
x = [1, 2, 3]
x .= x .+ 1

sx = SA[1, 2, 3] # SA constructs an SArray
sx = sx .+ 1 # Note the = is not broadcasted

Xranklin encounters an issue when building the site due to line 4 sx = SA[1, 2, 3]. It appears to activate its global Julia environment unprompted and cause a world age error.

[ Info:   ⏯️  evaluating cell staticarrays-example_4...
[ Info: 🔄 reactivating your previous environment...
  Activating project at `~/.julia/environments/v1.10`
ERROR: LoadError: MethodError: no method matching size(::StaticArraysCore.SVector{3, Int64})
The applicable method may be too new: running in world age 31647, while current world is 31649.

I have read a few issues opened regarding world ages, but nothing specifically mentioning where it occurs. Is this example an expected issue? How can I work around it?