the question is the following: is ebin folder limited only to modules named in
.app file, or user can (for whatever reason) manually add more
.beam files to it (such that manually added files are not part of the application)? Is placing extra modules in ebin folder considered a bad practice? It can come up handy in some scenarios because you don’t need to add additional code path to load those extra modules.
The problem is, if I use
application:load/1, extra modules are not loaded and are not part of the application I just loaded. However, when using
xref:add_application to add application to xref server, it adds those extra modules and associates them to the applications (one can check by calling
modules entry in
.app file is not even consulted.
application:load/1 load the same modules? The solution is either to limit ebin folder only to modules named in
.app file or to modify the behavior of
xref (I could come up with PR).
Thanks to @kuna.prime who pointed-out this edge-case.