Open KristofferC opened 3 months ago
This is a reduction of a test in test/strings/annotated.jl that avoids loading StyledStrings (which now gets loaded when loading Test.jl):
test/strings/annotated.jl
str1 = Base.AnnotatedString("test", [(1:4, :label => 5)]) str2 = Base.AnnotatedString("case", [(2:3, :label => "oomph")]) @assert join([str1, str1], ' ') == Base.AnnotatedString("test test", [(1:4, :label => 5), (6:9, :label => 5)])
Running this fails with:
ERROR: LoadError: AssertionError: join([str1, str1], ' ') == Base.AnnotatedString("test test", [(1:4, :label => 5), (6:9, :label => 5)])
However, if we add
using StyledStrings
to the top, the assert does not fire.
The reason for this is type piracy in StyledStrings: https://github.com/JuliaLang/StyledStrings.jl/issues/61.
It is weird that things like join on base types give different results depending on if an stdlib has been (transitively) loaded. The rendering of StyledStrings should probably move to Base to fix this.
join
@KristofferC to be clearer about what the plan/hope is here, are you thinking we ship 1.11 as-is, then move the code around in 1.12?
This is a reduction of a test in
test/strings/annotated.jl
that avoids loading StyledStrings (which now gets loaded when loading Test.jl):Running this fails with:
However, if we add
to the top, the assert does not fire.
The reason for this is type piracy in StyledStrings: https://github.com/JuliaLang/StyledStrings.jl/issues/61.
It is weird that things like
join
on base types give different results depending on if an stdlib has been (transitively) loaded. The rendering of StyledStrings should probably move to Base to fix this.