I’m trying to use Pkg extensions in OffsetArrays
in Move `Adapt` to a weak dependency by jishnub · Pull Request #331 · JuliaArrays/OffsetArrays.jl · GitHub, where the Project.toml reads
While trying to add packages to this branch, I face an error:
$ julia --project -e 'using Pkg; Pkg.add(["SnoopCompileCore", "SnoopCompile"])' [22:04:05]
Resolving package versions...
Updating `~/Dropbox/JuliaPackages/OffsetArrays.jl/Project.toml`
[79e6a3ab] ERROR: MethodError: no method matching stat_rep(::Nothing)
Closest candidates are:
stat_rep(::Pkg.Types.PackageSpec; name)
@ Pkg ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2045
Stacktrace:
[1] print_diff
@ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2068 [inlined]
[2] print_status(env::Pkg.Types.EnvCache, old_env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, header::Symbol, uuids::Vector{Base.UUID}, names::Vector{String}; manifest::Bool, diff::Bool, ignore_indent::Bool, outdated::Bool, extensions::Bool, io::Base.TTY, mode::Pkg.Types.PackageMode, hidden_upgrades_info::Bool, show_usagetips::Bool)
@ Pkg.Operations ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2344
[3] print_status
@ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2233 [inlined]
[4] status(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}; header::Symbol, mode::Pkg.Types.PackageMode, git_diff::Bool, env_diff::Pkg.Types.EnvCache, ignore_indent::Bool, io::Base.TTY, outdated::Bool, extensions::Bool, hidden_upgrades_info::Bool, show_usagetips::Bool)
@ Pkg.Operations ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2464
[5] status (repeats 2 times)
@ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2435 [inlined]
[6] #show_update#167
@ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:2431 [inlined]
[7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
@ Pkg.Operations ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:1393
[8] add
@ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/Operations.jl:1372 [inlined]
[9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/API.jl:275
[10] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/API.jl:156
[11] add(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/API.jl:145
[12] #add#25
@ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/API.jl:144 [inlined]
[13] add(pkgs::Vector{String})
@ Pkg.API ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/Pkg/src/API.jl:144
[14] top-level scope
@ none:1
I’m unsure about what’s causing this, but given that this is my first attempt at Pkg extensions, it’s possible that I’ve not set things up correctly. Some help is welcome!