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

[RootFS] Update Rust to v1.77.1 #372

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

giordano
Copy link
Member

@giordano giordano commented Apr 2, 2024

@giordano
Copy link
Member Author

giordano commented Apr 2, 2024

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 timholy/ProgressMeter.jl#305

@giordano
Copy link
Member Author

giordano commented Apr 2, 2024

For reference, relevant code is at

callbacks = LibGit2.Callbacks()
p = Progress(0, dt=1, desc="Cloning: ")
if progressbar
callbacks[:transfer_progress] = (
@cfunction(
transfer_progress,
Cint,
(Ptr{GitTransferProgress}, Any)
),
p
)
end
LibGit2.clone(url, repo_path; isbare=true, callbacks)

@IanButterworth
Copy link
Member

Sorry if I broke something. That PR should have just been a code move..

@giordano
Copy link
Member Author

giordano commented Apr 2, 2024

I'm not 100% it's that PR, but I confirm it works with ProgressMeter v1.9.0, so something in timholy/ProgressMeter.jl@v1.9.0...v1.10.0 affected it.

@giordano
Copy link
Member Author

giordano commented Apr 2, 2024

Bisection points to timholy/ProgressMeter.jl#304

@giordano
Copy link
Member Author

giordano commented Apr 2, 2024

For reference, the progressbar was added in #240, but it was likely based on similar features present in Pkg: JuliaLang/Pkg.jl#177, JuliaLang/julia#26387

@giordano
Copy link
Member Author

giordano commented Apr 2, 2024

So, problem is

p.n = progress.total_objects
left-hand side is of type Int, right-hand is UInt32, but there used to be automatic conversion before timholy/ProgressMeter.jl#304

@giordano
Copy link
Member Author

giordano commented Apr 3, 2024

Breaking change in ProgressMeter worked around in #373.

@giordano giordano merged commit f36b484 into JuliaPackaging:master Apr 3, 2024
9 checks passed
@giordano giordano deleted the mg/rust branch April 3, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants