Open crimson-knight opened 1 year ago
You could build the compiler in non-release mode, then the stack trace might give some more helpful insight.
@crimson-knight Could you try #13922 to see if that fixes it?
I found some more snippets that seem to get stuck forever:
require "compiler/crystal/syntax"
Crystal::Parser.new("").parse
Crystal::Parser.new("").invalid_internal_name?("")
Reduced:
def foo(x)
{% begin %}
case x
when Int32
case x
when {{ (0..env("N").to_i).to_a.splat }}
end
end
{% end %}
end
foo("")
This takes around 5 seconds when N=26
, and roughly doubles in time for each extra clause. So there is definitely exponential behavior that is resolved by #13922
@crimson-knight If you can still reproduce this issue, maybe you could try if #15065 resolves it?
Bug Report
I have a small binary app I decided to try the new
unreachable
tool on, but it appears to be crashing.Here are the last 25 lines:
My specs pass and my app is currently compiling and working as expected.
I cannot share any of the code, but I'll see if I can recreate with another app that I can share.