Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
version:
- '~1.9.0-0'
- '1.12'
- 'nightly'
os:
- ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PkgCacheInspector"
uuid = "a408fb95-4068-4cfa-a7f1-12fd503bd86c"
authors = ["Tim Holy <[email protected]> and contributors"]
version = "1.1.0"
version = "1.2.0"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand All @@ -10,7 +10,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
[compat]
DocStringExtensions = "0.9"
MethodAnalysis = "0.4"
julia = "1.9"
julia = "1.12"

[extensions]
MethodAnalysisExt = "MethodAnalysis"
Expand Down
13 changes: 3 additions & 10 deletions src/PkgCacheInspector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct PkgCacheInfo
"""
The list of modules stored in the package image. The final one is the "top" package module.
"""
modules::Vector{Any}
modules::Vector{Module}
"""
The list of modules with an `__init__` function, in the order in which they should be called.
"""
Expand All @@ -123,12 +123,6 @@ struct PkgCacheInfo
"""
new_method_roots::Vector{Any}
"""
The list of already-inferred MethodInstances that get called by items stored in this cachefile.
If any of these are no longer valid (or no longer the method that would be chosen by dispatch),
then some compiled code in this package image must be invalidated and recompiled.
"""
external_targets::Vector{Any}
"""
A lookup table of `external_targets` dependencies: `[mi1, indxs1, mi2, indxs2...]` means that `mi1`
(cached in this pkgimage) depends on `external_targets[idxs1]`; `mi2` depends on `external_targets[idxs2]`,
and so on.
Expand All @@ -147,7 +141,7 @@ struct PkgCacheInfo
"""
image_targets::Vector{Any}
end
PkgCacheInfo(cachefile::AbstractString, modules) = PkgCacheInfo(cachefile, modules, [], [], [], [], [], [], 0, PkgCacheSizes(), [])
PkgCacheInfo(cachefile::AbstractString, modules) = PkgCacheInfo(cachefile, modules, [], [], [], [], [], 0, PkgCacheSizes(), [])

function Base.show(io::IO, info::PkgCacheInfo)
nspecs = count_module_specializations(info.new_specializations)
Expand All @@ -167,7 +161,6 @@ function Base.show(io::IO, info::PkgCacheInfo)
println(io, length(nspecs) > 3 ? ", ...)" : ")")
end
!isempty(info.new_method_roots) && println(io, " ", length(info.new_method_roots) ÷ 2, " external methods with new roots")
!isempty(info.external_targets) && println(io, " ", length(info.external_targets) ÷ 3, " external targets")
!isempty(info.edges) && println(io, " ", length(info.edges) ÷ 2, " edges")
println(io, " ", rpad("file size: ", cache_displaynames_l+2), info.filesize, " (", Base.format_bytes(info.filesize),")")
show(IOContext(io, :indent => 2), info.cachesizes)
Expand Down Expand Up @@ -201,7 +194,7 @@ function info_cachefile(pkg::PkgId, path::String, depmods::Vector{Any}, image_ta
if isdefined(Base, :register_restored_modules)
Base.register_restored_modules(sv, pkg, path)
end
return PkgCacheInfo(path, sv[1:7]..., filesize(path), PkgCacheSizes(sv[8]...), image_targets)
return PkgCacheInfo(path, sv[1:6]..., filesize(path), PkgCacheSizes(sv[7]...), image_targets)
end

function info_cachefile(pkg::PkgId, path::String)
Expand Down
Loading