-
Notifications
You must be signed in to change notification settings - Fork 220
Description
When I try the live testing feature on CSTParser, I get this:
Status `C:\Users\david\AppData\Local\Temp\jl_Bd50j1\Project.toml`
[00ebfdb7] CSTParser v3.1.1-DEV `C:\Users\david\.julia\dev\CSTParser`
[0796e94c] Tokenize v0.5.8
[8dfed614] Test
CSTParser: Error During Test at C:\Users\david\.julia\dev\CSTParser\test\runtests.jl:4
Got exception outside of a @test
Test Summary: | Error Total
CSTParser | 1 1
ERROR: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.
finish(::Test.DefaultTestSet) at C:\Users\david\AppData\Local\Programs\Julia 1.5.3\share\julia\stdlib\v1.5\Test\src\Test.jl:879
top-level scope at C:\Users\david\AppData\Local\Programs\Julia 1.5.3\share\julia\stdlib\v1.5\Test\src\Test.jl:1125
Revise evaluation error at C:\Users\david\AppData\Local\Programs\Julia 1.5.3\share\julia\stdlib\v1.5\Test\src\Test.jl:1125
Stacktrace:
[1] methods_by_execution!(::Any, ::VSCodeLiveUnitTesting.Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::Module, ::Expr; mode::Symbol, disablebp::Bool, always_rethrow::Bool, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:skip_include,),Tuple{Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\lowered.jl:231
[2] #eval_with_signatures#90 at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:463 [inlined]
[3] instantiate_sigs!(::VSCodeLiveUnitTesting.OrderedCollections.OrderedDict{Module,VSCodeLiveUnitTesting.OrderedCollections.OrderedDict{VSCodeLiveUnitTesting.Revise.RelocatableExpr,Union{Nothing, Array{Any,1}}}}; mode::Symbol, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:skip_include,),Tuple{Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:471
[4] track(::Module, ::String; mode::Symbol, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:skip_include,),Tuple{Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:887
[5] track(::String; kwargs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:mode, :skip_include),Tuple{Symbol,Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:908
[6] run_test_loop(::String) at c:\Users\david\source\julia-vscode\scripts\packages\VSCodeLiveUnitTesting\src\VSCodeLiveUnitTesting.jl:48
[7] #3 at c:\Users\david\source\julia-vscode\scripts\packages\VSCodeLiveUnitTesting\src\VSCodeLiveUnitTesting.jl:104 [inlined]
[8] withenv(::VSCodeLiveUnitTesting.var"#3#5"{String}, ::Pair{String,String}) at .\env.jl:161
[9] (::Pkg.Operations.var"#100#104"{String,VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.PackageSpec})() at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1434
[10] with_temp_env(::Pkg.Operations.var"#100#104"{String,VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.PackageSpec}, ::String) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1348
[11] (::Pkg.Operations.var"#99#103"{VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.Context,Pkg.Types.PackageSpec,String,Pkg.Types.Project,String})(::String) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1419
[12] mktempdir(::Pkg.Operations.var"#99#103"{VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.Context,Pkg.Types.PackageSpec,String,Pkg.Types.Project,String}, ::String; prefix::String) at .\file.jl:709
[13] mktempdir(::Function, ::String) at .\file.jl:707 (repeats 2 times)
[14] sandbox(::Function, ::Pkg.Types.Context, ::Pkg.Types.PackageSpec, ::String, ::String, ::Pkg.Types.Project) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1386
[15] live_unit_test(::String, ::String) at c:\Users\david\source\julia-vscode\scripts\packages\VSCodeLiveUnitTesting\src\VSCodeLiveUnitTesting.jl:103
[16] top-level scope at c:\Users\david\source\julia-vscode\scripts\tasks\task_liveunittesting.jl:5
[17] include(::Function, ::Module, ::String) at .\Base.jl:380
[18] include(::Module, ::String) at .\Base.jl:368
[19] exec_options(::Base.JLOptions) at .\client.jl:296
[20] _start() at .\client.jl:506
This is what I get for QueryOperators.jl:
Status `C:\Users\david\AppData\Local\Temp\jl_nZFInn\Project.toml`
[864edb3b] DataStructures v0.17.17
[e7dc6d0d] DataValues v0.4.13
[82899510] IteratorInterfaceExtensions v1.0.0
[2aef5ad7] QueryOperators v0.9.4-DEV `C:\Users\david\.julia\dev\QueryOperators`
[5e66a065] TableShowUtils v0.2.5
[8dfed614] Test
┌ Warning: likely failure to return to toplevel, try `ExprSplitter`
└ @ VSCodeLiveUnitTesting.JuliaInterpreter c:\Users\david\source\julia-vscode\scripts\packages\JuliaInterpreter\src\interpret.jl:621
┌ Warning: likely failure to return to toplevel, try `ExprSplitter`
└ @ VSCodeLiveUnitTesting.JuliaInterpreter c:\Users\david\source\julia-vscode\scripts\packages\JuliaInterpreter\src\interpret.jl:621
Core: Error During Test at C:\Users\david\.julia\dev\QueryOperators\test\runtests.jl:7
Got exception outside of a @test
QueryOperators: Error During Test at C:\Users\david\.julia\dev\QueryOperators\test\runtests.jl:5
Got exception outside of a @test
Test Summary: | Pass Error Total
QueryOperators | 31 2 33
Core | 31 1 32
ERROR: Some tests did not pass: 31 passed, 0 failed, 2 errored, 0 broken.
finish(::Test.DefaultTestSet) at C:\Users\david\AppData\Local\Programs\Julia 1.5.3\share\julia\stdlib\v1.5\Test\src\Test.jl:879
top-level scope at C:\Users\david\AppData\Local\Programs\Julia 1.5.3\share\julia\stdlib\v1.5\Test\src\Test.jl:1125
Revise evaluation error at C:\Users\david\AppData\Local\Programs\Julia 1.5.3\share\julia\stdlib\v1.5\Test\src\Test.jl:1125
Stacktrace:
[1] methods_by_execution!(::Any, ::VSCodeLiveUnitTesting.Revise.CodeTrackingMethodInfo, ::Dict{Module,Array{Expr,1}}, ::Module, ::Expr; mode::Symbol, disablebp::Bool, always_rethrow::Bool, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:skip_include,),Tuple{Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\lowered.jl:231
[2] #eval_with_signatures#90 at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:463 [inlined]
[3] instantiate_sigs!(::VSCodeLiveUnitTesting.OrderedCollections.OrderedDict{Module,VSCodeLiveUnitTesting.OrderedCollections.OrderedDict{VSCodeLiveUnitTesting.Revise.RelocatableExpr,Union{Nothing, Array{Any,1}}}}; mode::Symbol, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:skip_include,),Tuple{Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:471
[4] track(::Module, ::String; mode::Symbol, kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:skip_include,),Tuple{Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:887
[5] track(::String; kwargs::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:mode, :skip_include),Tuple{Symbol,Bool}}}) at c:\Users\david\source\julia-vscode\scripts\packages\Revise\src\packagedef.jl:908
[6] run_test_loop(::String) at c:\Users\david\source\julia-vscode\scripts\packages\VSCodeLiveUnitTesting\src\VSCodeLiveUnitTesting.jl:48
[7] #3 at c:\Users\david\source\julia-vscode\scripts\packages\VSCodeLiveUnitTesting\src\VSCodeLiveUnitTesting.jl:104 [inlined]
[8] withenv(::VSCodeLiveUnitTesting.var"#3#5"{String}, ::Pair{String,String}) at .\env.jl:161
[9] (::Pkg.Operations.var"#100#104"{String,VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.PackageSpec})() at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1434
[10] with_temp_env(::Pkg.Operations.var"#100#104"{String,VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.PackageSpec}, ::String) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1348
[11] (::Pkg.Operations.var"#99#103"{VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.Context,Pkg.Types.PackageSpec,String,Pkg.Types.Project,String})(::String) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1419
[12] mktempdir(::Pkg.Operations.var"#99#103"{VSCodeLiveUnitTesting.var"#3#5"{String},Pkg.Types.Context,Pkg.Types.PackageSpec,String,Pkg.Types.Project,String}, ::String; prefix::String) at .\file.jl:709
[13] mktempdir(::Function, ::String) at .\file.jl:707 (repeats 2 times)
[14] sandbox(::Function, ::Pkg.Types.Context, ::Pkg.Types.PackageSpec, ::String, ::String, ::Pkg.Types.Project) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1386
[15] live_unit_test(::String, ::String) at c:\Users\david\source\julia-vscode\scripts\packages\VSCodeLiveUnitTesting\src\VSCodeLiveUnitTesting.jl:103
[16] top-level scope at c:\Users\david\source\julia-vscode\scripts\tasks\task_liveunittesting.jl:5
[17] include(::Function, ::Module, ::String) at .\Base.jl:380
[18] include(::Module, ::String) at .\Base.jl:368
[19] exec_options(::Base.JLOptions) at .\client.jl:296
[20] _start() at .\client.jl:506
I don't get any error for StringBuilders.jl, but that doesn't have an include in the runtests.jl file, so maybe that explains it...
I think we are essentially not using Revise.jl properly here, presumably...
@timholy, any chance you might be able to help? The relevant function is run_test_loop here. The idea is that this function should run test/runtests.jl once, and then rerun it whenever anything changes, either in the tests or in the package or somewhere else. We call this "live testing", so that one can work on the code of a package, and then whenever one saves a file, tests automatically rerun, and fast because we (hopefully) don't have to recompile everything. Does the general approach in that function look sane to you?