Closed DanielVandH closed 3 months ago
Thanks for the report. Are you on windows? I think this might be fixed by https://github.com/JuliaLang/JuliaSyntax.jl/pull/455 in that case. I asked for a new release earlier (https://github.com/JuliaLang/JuliaSyntax.jl/pull/455#issuecomment-2226152012).
Yeah, on Windows. I'll try it again once that's released and see.
Could also be related to:
warning: in the working copy of 'a\test5.jl', LF will be replaced by CRLF the next time Git touches it
I haven't really understood how line endings are handled by git on Windows.
That was just me running the test again for making the issue sorry, I should've cleared it. That shouldn't be related.
Or I'm wrong and it is related sorry. Just tried it again
PS C:\Users\danjv\.julia\dev\DelaunayTriangulation.jl> julia -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace 'src/DelaunayTriangulation.jl'
Formatting `src/DelaunayTriangulation.jl` .................................... ✖
ERROR: Runic.AssertionError: `nb != span(node)`. This is unexpected, please file an issue with a reproducible example at https://github.com/fredrikekre/Runic.jl/issues/new.
Stacktrace:
[1] trim_trailing_whitespace(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\runestone.jl:22
[2] format_node!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:301
[3] format_node_with_kids!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:233
[4] format_node!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:325
[5] format_node_with_kids!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:233
PS C:\Users\danjv\.julia\dev\DelaunayTriangulation.jl> julia -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace 'src/test12.jl'
Formatting `src/test12.jl` ................................................... ✖
ERROR: Runic.AssertionError: `nb != span(node)`. This is unexpected, please file an issue with a reproducible example at https://github.com/fredrikekre/Runic.jl/issues/new.
Stacktrace:
[1] trim_trailing_whitespace(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\runestone.jl:22
[2] format_node!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:301
[3] format_node_with_kids!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:233
[4] format_node!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:325
[5] format_node_with_kids!(ctx::Runic.Context, node::Runic.Node)
@ Runic C:\Users\danjv\.julia\packages\Runic\pOBbp\src\Runic.jl:233
Wouldn't be the complete issue I think since it breaks on a bunch of other files in my repo that I hadn't touched with Git first (unless Git is doing weird things that I'm unaware of, which is possible).
I can't reproduce this even if I change all \n
to \r\n
. If you still have a file where this happens can you attach the file directly so that I get the exakt file and so that not bytes are lost in the copy-pasting.
Great tool! I tried it out on DelaunayTriangulation.jl but I get an assertion error:
I'm not sure I quite understand it. The contents of
src/DelaunayTriangulation.jl
is simplybut when I put this into a new file, say
test5.jl
(as I was trying to do when making a smaller MWE for this issue..), everything works:Any ideas what's going wrong here? The tool works on other files in the repo like
src/setup.jl
, although the same error shows forsrc/exports.jl
.