Startup.jl errors in 1.11.0

My startup.jl file errors in Julia 1.11.0 and not in 1.10.

atreplinit() do repl
	@eval begin
		using Revise
		using OhMyREPL
		using BenchmarkTools
		using Infiltrator
	end
end

with the message

jakez@raspberrypi:~/data $ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.0 (2024-10-07)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

InitError: UndefRefError: access to undefined reference
during initialization of module REPLExt
julia> 

And the output of status is non-existent as shown

(@v1.11) pkg> st

(@v1.11) pkg> 

julia> 

When I rename startup.jl so it is not seen status and start Julia status does display the files in /home/jakez/.julia/environments/v1.12/Project.toml.

Any clues?

As a workaround, put

using Pkg: Pkg

before the atreplinit and things should work. See "UndefRefError: access to undefined reference" in 1.11 beta · Issue #345 · KristofferC/OhMyREPL.jl · GitHub.

1 Like