Closed Datseris closed 2 months ago
I can't reproduce this issue. What version of Julia and other packages are you using?
I have
pkg> st -m CairoMakie
[13f3f980] CairoMakie v0.12.2
julia> VERSION
v"1.10.0"
although I am not sure which "other" packages would be relevant here. Most of the packages in my project that have extensions were complaining, so I think it is more of an extension problem than a package problem. If you can't reproduce, it may be a fleeting problem. If I can reproduce consistently, I'll attach a manifest file here.
I'm seeing this as well today (local package, unfortunately).
More broadly: what is the design motivation for having the testing utilities included as part of an extension here?
If I understand correctly, this means that any downstream package that depends on TranscodingStreams and also happens to test anything also compiles the testing utilities for this package? That seems undesirable.
(Okay, I see there's earlier discussions of the motivation for this in #133 and #152)
Yes, I think it would be better to have the testing utilities in a separate package instead of an extension. The main reason for using extensions is backward compatibility because these utilities used to be part of the main package in v0.9
I still haven't figured out how to reproduce the error you are seeing. Does this only happen when you first try and update from TranscodingStreams@0.10.8
to TranscodingStreams@0.10.9
, and then doesn't happen again after you restart julia?
I figured out how to reproduce the error using stacked environments.
JULIA_DEPOT_PATH=/tmp/julia-depot julia -e '
using Pkg
pkg"add TranscodingStreams@0.10.8"; using TranscodingStreams
pkg"activate @stacked"; pkg"add TranscodingStreams@0.10.9 Test Random"; using Test, Random
'
┌ Warning: The Pkg REPL mode is intended for interactive use only, and should not be used from scripts. It is recommended to use the functional API instead.
└ @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:382
Updating registry at `/tmp/julia-depot/registries/General.toml`
Resolving package versions...
No Changes to `/tmp/julia-depot/environments/v1.10/Project.toml`
No Changes to `/tmp/julia-depot/environments/v1.10/Manifest.toml`
Activating project at `/tmp/julia-depot/environments/stacked`
Resolving package versions...
No Changes to `/tmp/julia-depot/environments/stacked/Project.toml`
No Changes to `/tmp/julia-depot/environments/stacked/Manifest.toml`
ERROR: LoadError: UndefVarError: `test_roundtrip_seekstart` not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:31
[2] top-level scope
@ /tmp/julia-depot/packages/TranscodingStreams/F7ot4/ext/TestExt.jl:65
[3] include
@ ./Base.jl:495 [inlined]
[4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2222
[5] top-level scope
@ stdin:3
in expression starting at /tmp/julia-depot/packages/TranscodingStreams/F7ot4/ext/TestExt.jl:1
in expression starting at stdin:3
┌ Error: Error during loading of extension TestExt of TranscodingStreams, use `Base.retry_load_extensions()` to retry.
│ exception =
│ 1-element ExceptionStack:
│ Failed to precompile TestExt [29286dec-c893-52d1-88fe-e07e79eb4405] to "/tmp/julia-depot/compiled/v1.10/TestExt/jl_NlfmxW".
│ Stacktrace:
│ [1] error(s::String)
│ @ Base ./error.jl:35
│ [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
│ @ Base ./loading.jl:2468
│ [3] compilecache
│ @ ./loading.jl:2340 [inlined]
│ [4] (::Base.var"#968#969"{Base.PkgId})()
│ @ Base ./loading.jl:1974
│ [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
│ @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
│ [6] #mkpidlock#6
│ @ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
│ [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
│ @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
│ [8] #invokelatest#2
│ @ ./essentials.jl:894 [inlined]
│ [9] invokelatest
│ @ ./essentials.jl:889 [inlined]
│ [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
│ @ Base ./loading.jl:2983
│ [11] maybe_cachefile_lock
│ @ ./loading.jl:2980 [inlined]
│ [12] _require(pkg::Base.PkgId, env::Nothing)
│ @ Base ./loading.jl:1970
│ [13] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│ @ Base ./loading.jl:1812
│ [14] #invoke_in_world#3
│ @ ./essentials.jl:926 [inlined]
│ [15] invoke_in_world
│ @ ./essentials.jl:923 [inlined]
│ [16] _require_prelocked
│ @ ./loading.jl:1803 [inlined]
│ [17] _require_prelocked
│ @ ./loading.jl:1802 [inlined]
│ [18] run_extension_callbacks(extid::Base.ExtensionId)
│ @ Base ./loading.jl:1295
│ [19] run_extension_callbacks(pkgid::Base.PkgId)
│ @ Base ./loading.jl:1330
│ [20] run_package_callbacks(modkey::Base.PkgId)
│ @ Base ./loading.jl:1164
│ [21] __require_prelocked(uuidkey::Base.PkgId, env::String)
│ @ Base ./loading.jl:1819
│ [22] #invoke_in_world#3
│ @ ./essentials.jl:926 [inlined]
│ [23] invoke_in_world
│ @ ./essentials.jl:923 [inlined]
│ [24] _require_prelocked(uuidkey::Base.PkgId, env::String)
│ @ Base ./loading.jl:1803
│ [25] macro expansion
│ @ ./loading.jl:1790 [inlined]
│ [26] macro expansion
│ @ ./lock.jl:267 [inlined]
│ [27] __require(into::Module, mod::Symbol)
│ @ Base ./loading.jl:1753
│ [28] #invoke_in_world#3
│ @ ./essentials.jl:926 [inlined]
│ [29] invoke_in_world
│ @ ./essentials.jl:923 [inlined]
│ [30] require(into::Module, mod::Symbol)
│ @ Base ./loading.jl:1746
│ [31] eval
│ @ ./boot.jl:385 [inlined]
│ [32] exec_options(opts::Base.JLOptions)
│ @ Base ./client.jl:291
│ [33] _start()
│ @ Base ./client.jl:552
└ @ Base loading.jl:1301
Maybe a related issue: https://discourse.julialang.org/t/compat-bound-violations-with-stacked-environements/116492
You can fix this error by updating all of the environments in the stack to make sure the packages are compatible, or by not using environment stacks.
in Windows 10, for version
This causes precompilation problems for many other package extensions , such as precompiling CairoMakie or DynamicalSystems (for reasons unknown to me).