WhatsApp / eqwalizer

A type-checker for Erlang
Apache License 2.0
506 stars 27 forks source link

Hanging on OTP-26 #23

Closed tsloughter closed 1 year ago

tsloughter commented 1 year ago

Just in case you don't know, elp hangs on OTP-26. I was about to open an issue just about the hanging until I realized I was running on OTP 26 and switched back to 25 to find that it worked.

$ elp eqwalize-all
  Loading rebar3 build_info                                                          
  Loading applications      ████████████████████ 16/16                               
  Seeding database                                                                   
  Compiling dependencies                                                           
escript: exception error: bad argument
  in function  byte_size/1
     called as byte_size({error,terminated})
     *** argument 1: not a bitstring
  in call from parse_server:loop/1 (parse_server.erl, line 23)
  in call from escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1 
  in call from init:do_boot/3 

When run with just elp eqwalize <module> it hangs at Compiling dependencies like it does with -all but without the byte_size exception.

VLanvin commented 1 year ago

Thanks for reporting this. It seems like using the parse server with OTP 26 introduces a few unexpected bytes at the beginning and end of the data, which then makes everything hang/crash.

We are investigating to find the source of this inconsistency.

ilya-klyuchnikov commented 1 year ago

This is the root cause: https://github.com/erlang/otp/issues/7132

ilya-klyuchnikov commented 1 year ago

the latest release of eqwalizer (0.17.16) works with OTP-26 in experimental mode (it doesn't support yet maybe and map comprehensions). (fixed in 1a457b6b02dd47d4ff9653302eb711ef569517b4 and e5521cdb59c5de58b0911d26ad17992c829d0119).