Skip to content

Strange issue with virtual libraries, non-virtual module ends up with missing implementation #2896

@Lupus

Description

@Lupus

I'm running into a weird issue when trying to get rid of functors for platform-dependent parts of my library in favor of virtual libraries. I've distilled down my codebase down to this project to illustrate the problem: https://github.com/Lupus/virtual-lib-issue

lib folder has 2 libraries, a and b, a has one virtual module, and one ordinary module, b depends on a and calls function from ordinary module.

lib-unix folder includes a, which is an implementation for a virtual library from lib folder.

examples contains an executable which calls function from b, which in turn calls function from a.

When I try to build the executable, I get the following error:

File "_none_", line 1:
Error: No implementations provided for the following modules:
         A__Real_module referenced from lib/b/b.cmxa(B__Foo)

I'm a bit lost on why this happens.

OCaml version is 4.06.1, dune 1.11.0.

Any help on this is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions