Skip to content

Fix historical stdlib fixup if Pkg is in the Manifest#4264

Merged
KristofferC merged 1 commit intomasterfrom
kf/fixoldpkgadd
Jun 20, 2025
Merged

Fix historical stdlib fixup if Pkg is in the Manifest#4264
KristofferC merged 1 commit intomasterfrom
kf/fixoldpkgadd

Conversation

@Keno
Copy link
Copy Markdown
Member

@Keno Keno commented Jun 18, 2025

The code here appeared to be untested and broke whenever something actually used it. Example backtrace:

julia> JLLPrefixes.collect_artifact_paths(["ripgrep_jll"])
ERROR: MethodError: no method matching haskey(::Vector{Base.UUID}, ::String)
The function `haskey` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  haskey(::Pkg.Types.Manifest, ::Any)
   @ Pkg ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Types.jl:323
  haskey(::REPL.Terminals.TTYTerminal, ::Any)
   @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/Terminals.jl:155
  haskey(::LibGit2.CachedCredentials, ::Any)
   @ LibGit2 ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/LibGit2/src/types.jl:1357
  ...

Stacktrace:
  [1] fixups_from_projectfile!(ctx::Pkg.Types.Context)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:238
  [2] add(ctx::Pkg.Types.Context, pkgs::Vector{…}, new_git::Set{…}; allow_autoprecomp::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:1710
  [3] add
    @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:1680 [inlined]
  [4] add(ctx::Pkg.Types.Context, pkgs::Vector{…}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol, allow_autoprecomp::Bool, kwargs::@Kwargs{…})
    @ Pkg.API ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/API.jl:328

The code here appeared to be untested and broke whenever something actually used it.
Example backtrace:

```
julia> JLLPrefixes.collect_artifact_paths(["ripgrep_jll"])
ERROR: MethodError: no method matching haskey(::Vector{Base.UUID}, ::String)
The function `haskey` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  haskey(::Pkg.Types.Manifest, ::Any)
   @ Pkg ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Types.jl:323
  haskey(::REPL.Terminals.TTYTerminal, ::Any)
   @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/Terminals.jl:155
  haskey(::LibGit2.CachedCredentials, ::Any)
   @ LibGit2 ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/LibGit2/src/types.jl:1357
  ...

Stacktrace:
  [1] fixups_from_projectfile!(ctx::Pkg.Types.Context)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:238
  [2] add(ctx::Pkg.Types.Context, pkgs::Vector{…}, new_git::Set{…}; allow_autoprecomp::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:1710
  [3] add
    @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:1680 [inlined]
  [4] add(ctx::Pkg.Types.Context, pkgs::Vector{…}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol, allow_autoprecomp::Bool, kwargs::@kwargs{…})
    @ Pkg.API ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/API.jl:328
```
@Keno Keno requested a review from KristofferC June 18, 2025 23:08
@KristofferC KristofferC merged commit cae9ce0 into master Jun 20, 2025
9 checks passed
@KristofferC KristofferC deleted the kf/fixoldpkgadd branch June 20, 2025 05:40
@IanButterworth IanButterworth added backport 1.12 backport 1.13 binarybuilder Related to the use of Pkg in BinaryBuilder labels Dec 9, 2025
IanButterworth pushed a commit that referenced this pull request Dec 11, 2025
The code here appeared to be untested and broke whenever something actually used it.
Example backtrace:

```
julia> JLLPrefixes.collect_artifact_paths(["ripgrep_jll"])
ERROR: MethodError: no method matching haskey(::Vector{Base.UUID}, ::String)
The function `haskey` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  haskey(::Pkg.Types.Manifest, ::Any)
   @ Pkg ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Types.jl:323
  haskey(::REPL.Terminals.TTYTerminal, ::Any)
   @ REPL ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/REPL/src/Terminals.jl:155
  haskey(::LibGit2.CachedCredentials, ::Any)
   @ LibGit2 ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/LibGit2/src/types.jl:1357
  ...

Stacktrace:
  [1] fixups_from_projectfile!(ctx::Pkg.Types.Context)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:238
  [2] add(ctx::Pkg.Types.Context, pkgs::Vector{…}, new_git::Set{…}; allow_autoprecomp::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol)
    @ Pkg.Operations ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:1710
  [3] add
    @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:1680 [inlined]
  [4] add(ctx::Pkg.Types.Context, pkgs::Vector{…}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol, allow_autoprecomp::Bool, kwargs::@kwargs{…})
    @ Pkg.API ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/Pkg/src/API.jl:328
```

(cherry picked from commit cae9ce0)
@KristofferC KristofferC mentioned this pull request Dec 19, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binarybuilder Related to the use of Pkg in BinaryBuilder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants