-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix nightly docstring test failure #30
Conversation
Weird, I can't figure out this test error. I'm able to reproduce it locally when I do julia> import Pkg; Pkg.test("StructIO")
Testing StructIO
Status `/private/var/folders/mk/htxc0f3n4z5g0t2qpk5hmvpr0000gn/T/jl_5cDMgp/Project.toml`
[53d494c1] StructIO v0.3.0 `~/.julia/dev/StructIO`
[8dfed614] Test v1.11.0
Status `/private/var/folders/mk/htxc0f3n4z5g0t2qpk5hmvpr0000gn/T/jl_5cDMgp/Manifest.toml`
[53d494c1] StructIO v0.3.0 `~/.julia/dev/StructIO`
[2a0f44e3] Base64 v1.11.0
[b77e0a4c] InteractiveUtils v1.11.0
[dc6e5ff7] JuliaSyntaxHighlighting v1.12.0
[56ddb016] Logging v1.11.0
[d6f4376e] Markdown v1.11.0
[9a3f8284] Random v1.11.0
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization v1.11.0
[f489334b] StyledStrings v1.11.0
[8dfed614] Test v1.11.0
Testing Running tests...
Test Summary: | Pass Total Time
unpack() | 7 7 0.4s
Test Summary: | Pass Total Time
pack() | 20 20 0.1s
Test Summary: | Pass Total Time
packed_sizeof() | 6 6 0.0s
Documentation: Test Failed at /Users/stevenj/.julia/dev/StructIO/test/runtests.jl:167
Expression: string(#= /Users/stevenj/.julia/dev/StructIO/test/runtests.jl:167 =# @doc(ParametricType)) == "This is a docstring\n"
Evaluated: "Base.Docs.DocStr(svec(\"This is a docstring\\n\"), nothing, Dict{Symbol, Any}(:typesig => Union{}, :module => Main, :linenumber => 35, :binding => ParametricType, :path => \"/Users/stevenj/.julia/dev/StructIO/test/runtests.jl\", :fields => Dict{Symbol, Any}()))" == "This is a docstring\n"
Stacktrace:
[1] top-level scope
@ ~/.julia/dev/StructIO/test/runtests.jl:167
[2] macro expansion
@ ~/Documents/Code/julia/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:1703 [inlined]
[3] macro expansion
@ ~/.julia/dev/StructIO/test/runtests.jl:167 [inlined]
[4] macro expansion
@ ~/Documents/Code/julia/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:679 [inlined]
Test Summary: | Fail Total Time
Documentation | 1 1 3.4s
ERROR: LoadError: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/stevenj/.julia/dev/StructIO/test/runtests.jl:166
ERROR: Package StructIO errored during testing but if I try to julia> using StructIO; include(dirname(pathof(StructIO)) * "/../test/runtests.jl")
Test Summary: | Pass Total Time
unpack() | 7 7 0.1s
Test Summary: | Pass Total Time
pack() | 20 20 0.0s
Test Summary: | Pass Total Time
packed_sizeof() | 6 6 0.0s
Test Summary: | Pass Total Time
Documentation | 1 1 0.0s
Test.DefaultTestSet("Documentation", Any[], 1, false, false, true, 1.723225727366976e9, 1.723225727367288e9, false, "/Users/stevenj/.julia/dev/StructIO/test/runtests.jl") Aha, it looks like it's something to do with the REPL, which defines some of the docstring-viewing methods. If I run |
Does importing REPL help? |
Yep, that's what I just committed. It works locally. |
This hopefully fixes a nightly failure I'm seeing on #29:
Apparently, on nightly,
@doc foo
is returning aDocStr
instance, which butstring(@doc foo)
no longer extracts the underlying string? Something should probably be fixed in Julia itself, but I'm hoping to find a workaround for now.