Bug in c:nc, R13B01

Alex Suraci i.am@REDACTED
Mon Sep 21 00:33:06 CEST 2009


Excerpt from lib/stdlib/src/c.erl: http://paste.pocoo.org/show/140752/

On line 7, Fname is naively assumed to be a .beam file compiled
to the same directory where the source .erl file resided. However, this
is often false, for example when there is an `outdir' option, or when
calling `nc()' from the shell with a path to a file like "foo/bar" (in which
case compile:file just plops it in the cwd of the shell).

For example. when you call `make:all([netload])' and your Emakefile
specifies `ebin' as your outdir, it will call `c:nc' and it'll compile fine,
but the modules won't update and you'll have no idea why (until you
dig a little deeper).

So, really, the only way for this function to work properly is when
compiling with the shell's cwd being the same directory as the .erl file.

--
Alex


More information about the erlang-bugs mailing list