[erlang-bugs] possible bug in package loading

Beads Land-Trujillo <>
Sun Jun 3 22:32:00 CEST 2012

Hi Eric,

Would be interested in some clarification as to what you're thinking might
be handled "better" here?  Unless I'm mistaken, this is per spec.  

One can argue with the elegance of the spec (I'm actually working on some
hacks for using packages to get around this design), which is why I'm
interested in the question.  

Is your contention that the compiler should generate some other sort of
message when finding a module declaration that doesn't match the directory
structure as mapped to a package path?

- Beads


-----Original Message-----
From:  [mailto:]
On Behalf Of Eric Merritt
Sent: Saturday, June 02, 2012 11:23 AM
Subject: [erlang-bugs] possible bug in package loading

I realize that packages are not technically supported. However, I ran across
a rather ugly (possible) bug that, as long as packages are in the language,
should probably be resolved.

The bug is this. Lets say you have a bin dir at
/some/directory/structure/ebin and you have packages under this, say package
foo.shell. If you accidentally set your package to
some/directory/structure/ebin/foo the code loader dies saying

=ERROR REPORT==== 2-Jun-2012::10:17:17 ===
beam/beam_load.c(1250): Error loading module shell:
  module name in object code is foo.shell

Technically I can see why this is an issue. However, I suspect it can be
handled better then it currently is.

erlang-bugs mailing list


More information about the erlang-bugs mailing list