rebar3
rebar3 copied to clipboard
Internal crash when deps missing during escriptize
When rebar3 runs escriptize and a dependency is missing, there is no error message, just an internal crash in rebar_prv_escriptize:
find_deps_of_deps([Name|Names], Apps, Acc) ->
?DIAGNOSTIC("processing ~p", [Name]),
{ok, App} = rebar_app_utils:find(Name, Apps), %% crashes with badmatch, error
Usually that would be because deps should not be missing (since we built them first).
Better error handling would probably make sense. In this case is this a dependency that the app declared but is neither in the stdlib nor your dep set? -- i.e. does it make sense to crash and blame the user, or would this be an internal bug?
Yeah, it happens when you're cargo cult programming and trying to get something to work by imitating someone elses rebar.config. :-) It's the user who is to blame, but right now you don't get any info about which dep was missing, just that it crashed. I had to instrument the code to see on which dep it died.
ah yeah. You would see it with DIAGNOSTIC=1 right before the crash but that isn't helpful enough.