Jbuilder silently ignores packages when library names conflict

Hi,

It appears that jbuilder will silently only choose to install one instance per library name even if multiple exists with different public names.

Example:

  • in directory ‘lib_foo’ I define a library with name ‘lib’ and public_name ‘x.foo’
  • in directory ‘lib_bar’ I define a library with name ‘lib’ and public_name ‘x.bar’
  • in the root I have ‘x.opam’ file.

In this case jbuilder build @install; jbuilder install will silently only install x.foo, and will ignore the existence of x.bar. No warnings or errors are printed. If I dump the rules from jbuilder (jbuilder rules) the rules for generating the meta file includes both libraries, but running jbuilder install installs only one library and writes a different meta file compared to the one dumped when running jbuilder rules.

I do understand that it is bad practice to create modules that cannot be used together in the same compilation unit, but for the time being I would really like to have this. Is there a way to force jbulder to install both libraries anyways abd keep the name ‘lib’ for both? I would rather not require users of my library to rewrite all code to use Lib_foo or Lib_bar for now.

/Anders Fugmann