Skip to content

Conversation

@mefyl
Copy link
Collaborator

@mefyl mefyl commented Sep 13, 2022

Signed-off-by: mefyl mefyl@gruntech.org

@mefyl
Copy link
Collaborator Author

mefyl commented Sep 13, 2022

The error exhibited here is not the same as the one I get locally, which is the erroneous behavior I want to exhibit. I'm not sure why (yet)

File "test/blackbox-tests/test-cases/root-module-duplicate.t", line 1, characters 0-0:
Renamed _build/.sandbox/f5fdd33f4e465224997051cdf5d77d56/default/test/blackbox-tests/test-cases/root-module-duplicate.t to _build/.sandbox/f5fdd33f4e465224997051cdf5d77d56/default/test/blackbox-tests/test-cases/root-module-duplicate.t.corrected
_build/.sandbox/f5fdd33f4e465224997051cdf5d77d56/default/test/blackbox-tests/test-cases/root-module-duplicate.t.corrected --- Text
53                                      53 
54 Trigger the error.                   54 Trigger the error.
55                                      55 
56   $ dune build                       56   $ dune build
                                        57   File "root.ml-gen", line 15, characters 0-18:
                                        58   15 | module Logs = Logs
                                        59        ^^^^^^^^^^^^^^^^^^
                                        60   Error: Multiple definition of the module name Logs.
                                        61          Names must be unique in a given structure or signature.
                                        62   [1]

Signed-off-by: mefyl <mefyl@gruntech.org>
@mefyl
Copy link
Collaborator Author

mefyl commented Sep 13, 2022

It does now exhibit the incorrect behavior as expected.

@rgrinberg
Copy link
Member

Thanks for the repro. The issue is caused by an unfortunate interaction between:

  1. The library layout in the logs package. It does not install sub libraries in separate directories.

  2. For findlib libraries, dune needs to guess what the entry modules are.

The result is that 2. cannot work if all the libraries are installed in one dir.

The simplest fix would be to change logs to install sub libraries in sub directories. This would have other advantages as well.

@rgrinberg
Copy link
Member

I merged your test case with a few small edits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants