Open sushilbansal opened 3 months ago
upon further investigation, the issue occured with elixir v 1.17.2-otp-27 but if i switch back to the previous version i was using, then there are no issues: 1.16.0-otp-26
I'm also getting this, elixir v 1.17.1-otp-27
I suspect this bugfix mentioned in the changelog for Elixir 1.17.0 might be a clue:
[Kernel] Resolve inconsistencies of how .. and ... are handled at the AST level
I'm also getting this,
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Elixir 1.17.1 (compiled with Erlang/OTP 27)
Thank you very much for reporting! Your conclusion seems correct: TypeCheck integrates (/has to integrate) quite closely with Elixir's AST to work correctly (since it parses the builtin typespec syntax), but it seems that in the change from v1.16 to v1.17 the way ...
is handled has changed.
So for the time being, it seems that TypeCheck doesn't work on Elixir v1.17.
Unfortunately I am on vacation with no laptop close at hand until the start of August. If anyone is able to contribute a fix in the meantime I'll merge and publish that PR as soon as possible. Otherwise, please hang tight until the start of August.
I'm sorry for the inconvenience 😔.
Specifically I think that
will need a change. That is the pattern match that should handle (... -> any)
but it seems to no longer trigger.
i took a look today, and it seems 1.17 has an empty list instead of the module name as the 3rd element in the tuple. I'm unsure if this is the correct way to fix this, but changing the guard to accept the empty list in that position allowed it to compile on 1.17.2:
[[{:..., _, module}], return_type] when is_atom(module) or module == [] ->
i'll open a pr with the change, but if theres anything obviously incorrect about it, feel free to close it or point me in the correct direction
mix.exs:
compile time error: