TestItemRunner v1.0.0 breaks compatibility with Julia 1.10 release branch?
It seems to be the case that moving from TestItemRunner v0.2.3 to v1.0.0 breaks compatibility with Julia 1.10. (Simultaneously, the new TestItemRunner releases fix compatibility with Julia 1.11-beta!)
For example, when I try the following with Julia 1.10.4,
add Sunny
test Sunny
I get the following error that originates in TestItemRunner:
ERROR: LoadError: StringIndexError: invalid index [2076], valid nearby indices [2074]=>'′', [2077]=>'\n'
Stacktrace:
[1] string_index_err(s::String, i::Int64)
@ Base ./strings/string.jl:12
[2] getindex
@ ./strings/string.jl:470 [inlined]
[3] (::TestItemRunner.var"#8#10"{String, String})(i::@NamedTuple{name::String, range::UnitRange{Int64}, code_range::UnitRange{Int64}, option_default_imports::Bool, option_tags::Vector{Symbol}, option_setup::Vector{Symbol}})
@ TestItemRunner ./none:0
[4] iterate
@ ./generator.jl:47 [inlined]
[5] collect_to!(dest::Vector{@NamedTuple{filename::String, code::String, name::String, option_tags::Vector{Symbol}, option_default_imports::Bool, option_setup::Vector{Symbol}, line::Int64, column::Int64}}, itr::Base.Generator{Vector{Any}, TestItemRunner.var"#8#10"{String, String}}, offs::Int64, st::Int64)
@ Base ./array.jl:892
[6] collect_to_with_first!(dest::Vector{@NamedTuple{filename::String, code::String, name::String, option_tags::Vector{Symbol}, option_default_imports::Bool, option_setup::Vector{Symbol}, line::Int64, column::Int64}}, v1::@NamedTuple{filename::String, code::String, name::String, option_tags::Vector{Symbol}, option_default_imports::Bool, option_setup::Vector{Symbol}, line::Int64, column::Int64}, itr::Base.Generator{Vector{Any}, TestItemRunner.var"#8#10"{String, String}}, st::Int64)
@ Base ./array.jl:870
[7] collect(itr::Base.Generator{Vector{Any}, TestItemRunner.var"#8#10"{String, String}})
@ Base ./array.jl:844
[8] run_tests(path::String; filter::var"#1#2", verbose::Bool)
@ TestItemRunner ~/.julia/packages/TestItemRunner/FirQ9/src/TestItemRunner.jl:171
[9] top-level scope
@ ~/.julia/dev/Sunny/test/runtests.jl:3
[10] include(fname::String)
@ Base.MainInclude ./client.jl:489
[11] top-level scope
@ none:6
in expression starting at /Users/kbarros/.julia/dev/Sunny/test/runtests.jl:3
ERROR: Package Sunny errored during testing
Please let me know if it would be helpful to construct a smaller example.
I think this is an upstream bug in JuliaSyntax https://github.com/JuliaLang/JuliaSyntax.jl/issues/457.
At least on my system that error is present both on Julia 1.10.4 and 1.11.0-rc
Thanks for reporting!
Ran into this too. So I guess the workaround is avoid unicode line endings?
It looks like the upstream bug is being fixed. Does that mean this will automatically be resolved, and is there a known timeline? Thanks.
I think this should actually be fixed everywhere now, are you still getting this?
It seems to be working, thank you!