JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
616 stars 258 forks source link

Replace UnstableIO with IOContext{IO} #3735

Closed mkitti closed 4 months ago

mkitti commented 8 months ago

While trying to send UnstableIO into Julia base, two suggestions arose:

  1. Use Base.inferencebarrier to prevent specialization: https://github.com/JuliaLang/julia/pull/52249#discussion_r1401199265
  2. Use IOContext{IO} rather than introducing a new type: https://github.com/JuliaLang/julia/pull/52249#discussion_r1425332525

Fix #3722 (IOContext has closewrite) Addresses part of #3702 by removing UnstableIO and its associated invalidations.

KristofferC commented 4 months ago

Looks like this has to be rebased to update for another use of UnstableIO (looking at the CI):

┌ Pkg
│  WARNING: could not import Pkg.UnstableIO into Operations
└  
     Testing Running tests...
ERROR: LoadError: UndefVarError: `UnstableIO` not defined in `Pkg.Operations`
Stacktrace:
  [1] subprocess_handler(cmd::Cmd, io::IOContext{IO}, error_msg::String)
    @ Pkg.Operations ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:2223
  [2] (::Pkg.Operations.var"#138#143"{Pkg.Types.Context})()
    @ Pkg.Operations ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:2129
mkitti commented 4 months ago

I will take a look, thanks.

mkitti commented 4 months ago

@KristofferC CI is now passing here.

KristofferC commented 4 months ago

👍