Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg.instantiate(io=...) error on Julia 1.6.0 #2490

Closed
c42f opened this issue Apr 6, 2021 · 5 comments
Closed

Pkg.instantiate(io=...) error on Julia 1.6.0 #2490

c42f opened this issue Apr 6, 2021 · 5 comments

Comments

@c42f
Copy link
Member

c42f commented Apr 6, 2021

There's a bug with _auto_precompile being passed the wrong arguments if Pkg.instantiate is used with the io keyword argument. With a minimal project and manifest for a package which hasn't yet been installed on the machine:

Project

[deps]
Underscores = "d9a01c3f-67ce-4d8c-9b55-35f6e4050bb1"

Manifest:

# This file is machine-generated - editing it directly is not advised

[[Underscores]]
git-tree-sha1 = "986a17a99a20d2c588f12585ff32458140eb9603"
uuid = "d9a01c3f-67ce-4d8c-9b55-35f6e4050bb1"
version = "2.0.0"

Calling instantiate() as follows causes a crash:

julia> using Pkg

julia> Pkg.activate(".")
  Activating environment at `~/work/latency/instantiate_bug/Project.toml`

julia> io = IOBuffer()
       Pkg.instantiate(; io=io)
ERROR: MethodError: no method matching _auto_precompile(::Pkg.Types.Context; io=IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=true, append=false, size=36, maxsize=Inf, ptr=37, mark=-1))
Closest candidates are:
  _auto_precompile(::Pkg.Types.Context) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Pkg.jl:589 got unsupported keyword argument "io"
Stacktrace:
 [1] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_autoprecomp::Bool, kwargs::Base.Iterators.Pairs{Symbol, IOBuffer, Tuple{Symbol}, NamedTuple{(:io,), Tuple{IOBuffer}}})
   @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1367
 [2] #instantiate#246
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/API.jl:1272 [inlined]
 [3] top-level scope
   @ REPL[4]:2
@c42f
Copy link
Member Author

c42f commented Apr 6, 2021

Ah, it looks like @IanButterworth may have already fixed this in #2335 #2402

Can that fix be backported to julia-1.6.1?

@KristofferC
Copy link
Member

Hm, I don't really see how that PR would fix it.

@c42f
Copy link
Member Author

c42f commented Apr 6, 2021

Wrong link sorry. #2402 was the one.

@IanButterworth
Copy link
Member

IanButterworth commented Apr 6, 2021

Now backported to #2425

@c42f
Copy link
Member Author

c42f commented Apr 7, 2021

Beautiful, thanks Ian :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants