<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Some clarifications...</div><div class="gmail_quote"><br></div><div class="gmail_quote">On 30 May 2017 at 15:45, Roger Lipscombe <span dir="ltr"><<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>When compiling some Erlang source files with mix, I discovered that it leaves out the abstract_code chunk.</div></div></blockquote><div><br></div><div>or: ...when compiling some Erlang source files with mix, with custom erlc_options that omit :debug_info, it leaves out the abstract_code chunk.</div><div><br></div><div>or: ...when compiling Erlang source files without 'debug_info', when the output directory isn't just 'src' replaced with 'ebin' (i.e. rebar3 or mix behaviour...).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>This means that rr(Mod) -- implemented in shell:read_file_records/2 -- falls through to shell:try_source/2, which looks in the "CInf" chunk. It then uses the 'options'.'outdir' value and attempts to recreate the source path from that.<br></div><div><br></div><div>That is: given the following:</div></div></blockquote><div><br></div><div>...result from Baz:module_info(compile)...</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div><div>[{options, [{outdir, "/home/roger/Source/foo/bar/_<wbr>build/dev/lib/baz/ebin"},</div><div>           {i,"include"}]},</div><div> {version,"7.0.4"},</div><div> {source,"/home/roger/Source/<wbr>foo/bar/baz/src/quux.erl"}]</div></div></div></blockquote><div><br></div><div>(or, equivalently, the "CInf" chunk)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>...it'll look for "/home/roger/Source/foo/bar/_<wbr>build/dev/lib/baz/ebin/quux.<wbr>erl" and "/home/roger/Source/foo/bar/_<wbr>build/dev/lib/baz/src/quux.<wbr>erl", which don't exist.</div><div><br></div><div>int:find_src/2 does the same.</div><div><br></div><div>It seems to me that the correct behaviour would be to use the 'source' property, if present...?</div></div>
</blockquote></div><br></div></div>