diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da3c9473..31001897 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,7 @@ jobs: # Check #697 echo "Test #697" dn=$(mktemp -d) + ver=$(julia -e '(!isempty(VERSION.prerelease) && VERSION.prerelease[1] == "DEV") ? println(Base.GIT_VERSION_INFO.commit) : println(VERSION)') path=$(julia -e '(!isempty(VERSION.prerelease) && VERSION.prerelease[1] == "DEV") ? println(Base.GIT_VERSION_INFO.commit) : println("refs/tags/v",VERSION)') curl -s -L https://github.com/JuliaLang/julia/archive/$path.tar.gz --output - | tar -xz -C $dn julia --project test/juliadir.jl "$dn/julia-$ver" diff --git a/src/recipes.jl b/src/recipes.jl index ec9bb156..c8b78fc9 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -88,7 +88,7 @@ function _track(id, modname; modified_files=revision_queue) # Save the result (unnecessary if already in pkgdatas, but doesn't hurt either) pkgdatas[id] = pkgdata elseif modname === :Compiler - compilerdir = normpath(joinpath(juliadir, "Compiler")) + compilerdir = normpath(joinpath(juliadir, "Compiler", "src")) compilerdir_pre_112 = normpath(joinpath(juliadir, "base", "compiler")) isdir(compilerdir) || (compilerdir = compilerdir_pre_112) pkgdata = get(pkgdatas, id, nothing) diff --git a/test/backedges.jl b/test/backedges.jl index 440adaf6..8cd82b9e 100644 --- a/test/backedges.jl +++ b/test/backedges.jl @@ -17,7 +17,7 @@ do_test("Backedges") && @testset "Backedges" begin src2 = src.code[idtype].args[1] methodinfo = Revise.MethodInfo() isrequired = Revise.minimal_evaluation!(methodinfo, frame, :sigs)[1] - @test sum(isrequired) == length(src.code)-1 # skips the `return` at the end + @test sum(isrequired) == length(src.code)-count(e->isexpr(e, :latestworld), src.code)-1 # skips the `return` at the end src = """ # issue #249 diff --git a/test/non_jl_test.jl b/test/non_jl_test.jl index 513c7dda..b7e91625 100644 --- a/test/non_jl_test.jl +++ b/test/non_jl_test.jl @@ -43,12 +43,12 @@ end sleep(mtimedelay) m=MyFile(path) includet(m) - yry() # comes from test/common.jl + @yry() # comes from test/common.jl @test fake_lang.y() == "2" @test fake_lang.x() == "1" sleep(mtimedelay) cp(joinpath(@__DIR__, "fake_lang", "new_test.program"), path, force=true) - yry() + @yry() @test fake_lang.x() == "2" @test_throws MethodError fake_lang.y() finally diff --git a/test/switch_version.jl b/test/switch_version.jl index de4cc69a..a8806f17 100644 --- a/test/switch_version.jl +++ b/test/switch_version.jl @@ -1,4 +1,16 @@ using Revise, Pkg, Test + +if isdefined(Core, :var"@latestworld") + import Core: @latestworld +else + # In older Julia versions, there were more implicit + # world age increments, so the macro is generally not + # required. + macro latestworld() + nothing + end +end + mktempdir() do thisdir Pkg.activate(thisdir) @@ -17,6 +29,7 @@ mktempdir() do thisdir isdefined(Base, :errormonitor) && Base.errormonitor(t) wait(Revise.revision_event) revise() + @latestworld @test somemethod() === 1 # present in v2 # ...and then switch back (check that it's bidirectional and also to reset state) v1_cmd = """using Pkg; Pkg.activate("."); Pkg.develop(path = joinpath("$(escape_string(dirname(@__FILE__)))", "pkgs", "PkgChange_v1"))""" @@ -24,6 +37,7 @@ mktempdir() do thisdir isdefined(Base, :errormonitor) && Base.errormonitor(t) wait(Revise.revision_event) revise() + @latestworld @test_throws MethodError somemethod() # not present in v1 end end