Skip to content

Commit

Permalink
Restore filtering of non-src files
Browse files Browse the repository at this point in the history
This patch restores the filtering of non-src files that was lost
in #767. After JuliaLang/julia#49866,
`Base.parse_cache_header` returns both the non-filtered and filtered
list instead of doing filtering internally based on the
`srcfiles_only::Bool` keyword argument.

There is a test for this failure mode that fails on Revise master branch
and passes with this patch (see
https://github.com/timholy/Revise.jl/blob/1059181bed06387e9fbcea137dce28a80c5c45d9/test/runtests.jl#L3070-L3080).
  • Loading branch information
fredrikekre committed Nov 14, 2023
1 parent 1059181 commit 536d71e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ function pkg_fileinfo(id::PkgId)
cachepath = origin.cachepath
cachepath === nothing && return nothing, nothing, nothing
provides, includes_requires, required_modules = try
@static if VERSION v"1.11.0-DEV.683"
Base.parse_cache_header(cachepath)
@static if VERSION v"1.11.0-DEV.683" # https://github.com/JuliaLang/julia/pull/49866
provides, (_, includes_srcfiles_only, requires), required_modules, _... =
Base.parse_cache_header(cachepath)
provides, (includes_srcfiles_only, requires), required_modules
else
Base.parse_cache_header(cachepath, srcfiles_only = true)
end
Expand Down

0 comments on commit 536d71e

Please sign in to comment.