Open postmodern opened 2 years ago
Yeah, I've seen this crop up from time to time. I'm not sure exactly what causes those issues.
The blank line (error pointing at the wrong source code?) might be related to an issue we've seen before that looks to be a bug in Crystal. Line numbers seem to get messed up when macros are placed in macros.
I've also seen the compiler crash and get that negative argument exception when toggling the --error-trace
option. I think I've seen it caused by undefined reference to a variable or method?
I've noticed with 0.10 that the reported line/column of compilation errors are not always accurate. I am not sure whether this is a Spectator issue or really a Crystal compiler issue. When compiling a RSpec file which has been ran through ruby_crystal_codemod and half-ported over to Crystal/Spectator,
crystal spec spec/foo_spec.cr --error-trace
will report a syntax error on a blank line just before anothercontext
block and a mysterious internal error. When I remove--error-trace
, I can sometimes see the correct error message.Example