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

Update ccalls in info_cachefile to Julia upstream changes #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/PkgCacheInspector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,19 @@ end

function info_cachefile(pkg::PkgId, path::String, depmods::Vector{Any}, isocache::Bool=false)
if isocache
sv = ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint), path, depmods, true)
@static if VERSION >= v"1.11.0-DEV.922" # https://github.com/JuliaLang/julia/pull/52123
sv = ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint, Cstring, Cint), path, depmods, true, pkg.name, false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IanButterworth Is using ignore_native = false for the last argument correct?

elseif VERSION >= v"1.10.0-DEV.1145" # https://github.com/JuliaLang/julia/pull/49538
sv = ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint, Cstring), path, depmods, true, pkg.name)
else
sv = ccall(:jl_restore_package_image_from_file, Any, (Cstring, Any, Cint), path, depmods, true)
end
else
sv = ccall(:jl_restore_incremental, Any, (Cstring, Any, Cint), path, depmods, true)
if VERSION >= v"1.10.0-DEV.1145" # https://github.com/JuliaLang/julia/pull/49538
sv = ccall(:jl_restore_incremental, Any, (Cstring, Any, Cint, Cstring), path, depmods, true, pkg.name)
else
sv = ccall(:jl_restore_incremental, Any, (Cstring, Any, Cint), path, depmods, true)
end
end
if isa(sv, Exception)
throw(sv)
Expand Down
Loading