GetFirefly / firefly

An alternative BEAM implementation, designed for WebAssembly
Apache License 2.0
3.61k stars 105 forks source link

I/O errors should include the path that the error occurred on #579

Closed KronicDeth closed 3 years ago

KronicDeth commented 4 years ago

When trying to compile init.erl from erlang/otp, the parsing error isn't obvious what is wrong:

lumen compile --output-dir _build erts/preloaded/src/init.erl 
   Compiling erts/preloaded/src/init.erl
error: No such file or directory (os error 2)

error: parsing failed

      Failed erts/preloaded/src/init.erl

Which file or directory doesn't exist? The output directory, _build exists as does erts/preloaded/src/init.erl.

We should include file names/paths for when this happens. @hansihe I think this is happening in the EIR libraries that lumen is calling, so may need to transfer this issue to it.

bitwalker commented 4 years ago

@KronicDeth is this fixed with the recent fixes @hansihe applied to the parser?

bcardarella commented 3 years ago

Majority has been fixed but not 100% yet. Closing in favor of future work.