Closed giordano closed 4 months ago
To reproduce the error:
julia> BinaryBuilderBase.cached_git_clone("https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl"; progressbar=true)
ERROR: TypeError: in setfield!, expected Int64, got a value of type UInt32
Stacktrace:
[1] setproperty!(p::ProgressMeter.Progress, name::Symbol, value::UInt32)
@ ProgressMeter ~/.julia/packages/ProgressMeter/dMfiC/src/ProgressMeter.jl:26
[2] transfer_progress(progress::Ptr{BinaryBuilderBase.GitTransferProgress}, payloads::Dict{Symbol, Any})
@ BinaryBuilderBase ~/.julia/dev/BinaryBuilderBase/src/Sources.jl:192
[3] macro expansion
@ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/error.jl:110 [inlined]
[4] clone(repo_url::String, repo_path::String, clone_opts::LibGit2.CloneOptions)
@ LibGit2 ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/repository.jl:459
[5] clone(repo_url::String, repo_path::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::Nothing, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
@ LibGit2 ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:585
[6] clone
@ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:558 [inlined]
[7] cached_git_clone(url::String; hash_to_check::Nothing, downloads_dir::String, verbose::Bool, progressbar::Bool)
@ BinaryBuilderBase ~/.julia/dev/BinaryBuilderBase/src/Sources.jl:241
[8] top-level scope
@ REPL[6]:1
This apparently broke in ProgressMeter v1.10.0. CC @IanButterworth who authored https://github.com/timholy/ProgressMeter.jl/pull/305
For reference, relevant code is at https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/0b0372d8fb22d836bc878c38dd0375ac693ea42d/src/Sources.jl#L229-L241
Sorry if I broke something. That PR should have just been a code move..
I'm not 100% it's that PR, but I confirm it works with ProgressMeter v1.9.0, so something in https://github.com/timholy/ProgressMeter.jl/compare/v1.9.0...v1.10.0 affected it.
Bisection points to https://github.com/timholy/ProgressMeter.jl/pull/304
For reference, the progressbar was added in #240, but it was likely based on similar features present in Pkg: https://github.com/JuliaLang/Pkg.jl/pull/177, https://github.com/JuliaLang/julia/pull/26387
So, problem is https://github.com/JuliaPackaging/BinaryBuilderBase.jl/blob/0b0372d8fb22d836bc878c38dd0375ac693ea42d/src/Sources.jl#L192 left-hand side is of type Int, right-hand is UInt32, but there used to be automatic conversion before https://github.com/timholy/ProgressMeter.jl/pull/304
Breaking change in ProgressMeter worked around in #373.
Companion PR to https://github.com/JuliaPackaging/Yggdrasil/pull/8412