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

Restore filtering of non-src files #776

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Restore filtering of non-src files #776

merged 2 commits into from
Nov 14, 2023

Conversation

fredrikekre
Copy link
Collaborator

@fredrikekre fredrikekre commented Nov 14, 2023

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

Revise.jl/test/runtests.jl

Lines 3070 to 3080 in 1059181

do_test("Non-jl include_dependency (issue #388)") && @testset "Non-jl include_dependency (issue #388)" begin
push!(LOAD_PATH, joinpath(@__DIR__, "pkgs"))
@eval using ExcludeFile
sleep(0.01)
pkgdata = Revise.pkgdatas[Base.PkgId(UUID("b915cca1-7962-4ffb-a1c7-2bbdb2d9c14c"), "ExcludeFile")]
files = Revise.srcfiles(pkgdata)
@test length(files) == 2
@test joinpath("src", "ExcludeFile.jl") files
@test joinpath("src", "f.jl") files
@test joinpath("deps", "dependency.txt") files
end
).

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).
@KristofferC KristofferC merged commit 50c06bc into master Nov 14, 2023
8 of 13 checks passed
@fredrikekre fredrikekre deleted the fe/srcfiles-only branch November 14, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants