You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> crystal tool format --show-backtrace
expecting keyword nil, not `COMMENT, # blah`, at :2:3 (Exception)
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'raise:NoReturn'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'raise:NoReturn'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Formatter#write_keyword:Crystal::Token'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Formatter#accept_assign_value:(Array(Crystal::Formatter::AlignInfo) | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command::FormatCommand#format_source:(IO+ | Int32 | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command::FormatCommand#format_many:Nil'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command#format:NoReturn'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command#tool:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in '__crystal_main'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'main'
> crystal tool format --show-backtrace
Nil assertion failed (NilAssertionError)
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'raise:NoReturn'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Nil#not_nil!:NoReturn'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Formatter#format_args_simple:Tuple(Bool, Bool, Int32)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Formatter#format_args:Tuple(Bool | Nil, Bool, Int32)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Formatter#visit:Bool'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Formatter#accept_assign_value:(Array(Crystal::Formatter::AlignInfo) | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::ASTNode+@Crystal::ASTNode#accept:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command::FormatCommand#format_source:(IO+ | Int32 | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command::FormatCommand#format_many:Nil'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command#format:NoReturn'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'Crystal::Command#tool:(Bool | Nil)'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in '__crystal_main'
from /opt/homebrew/Cellar/crystal/1.4.1/libexec/crystal in 'main'
Hello again! I've run into a formatter issue.
This:
and this:
both trigger a crash in the formatter.
Output from first snippet
Output from second snippet
I added the
\
to try to suppress the formatter's default behavior of moving the comment up onto line 1, leaving line 2 blank:Compiler version:
Quick tangentially related question: Is automatic splitting of long lines on the roadmap? It would make the formatter much more useful to me.
Thanks :)
The text was updated successfully, but these errors were encountered: