Skip to content

separate installation of virtual-modules packages fails #2322

@avsm

Description

@avsm

I've ported io-page to use virtual_modules, and it works great in a duniverse. However, when publishing separate opam packages and using dune build -p, they can no longer be installed since the source code is in different repos. This is a pretty big blocker to using the feature, unless I'm doing something wrong in how I'm using it.

#=== ERROR while compiling io-page-xen.dev ====================================#
# context              2.0.4 | linux/x86_64 | ocaml-base-compiler.4.08.0 | pinned(file:///repo)
# path                 ~/.opam/4.08/.opam-switch/build/io-page-xen.dev
# command              /usr/bin/env OPAM_PKG_CONFIG_PATH=/home/opam/.opam/4.08/lib/pkgconfig dune build -p io-page-xen -j 71
# exit-code            1
# env-file             ~/.opam/log/io-page-xen-3173-be7d52.env
# output-file          ~/.opam/log/io-page-xen-3173-be7d52.out
### output ###
# File "lib/xen/dune", line 7, characters 14-21:
# 7 |   (implements io-page)
#                   ^^^^^^^
# Error: Library implementation io-page for variant "xen" implements a library outside the project. This is forbidden.
#=== ERROR while compiling io-page-unix.dev ===================================#
# context              2.0.4 | linux/x86_64 | ocaml-base-compiler.4.08.0 | pinned(file:///repo)
# path                 ~/.opam/4.08/.opam-switch/build/io-page-unix.dev
# command              ~/.opam/4.08/bin/dune build -p io-page-unix -j 71
# exit-code            1
# env-file             ~/.opam/log/io-page-unix-3173-a63268.env
# output-file          ~/.opam/log/io-page-unix-3173-a63268.out
### output ###
# File "lib/unix/dune", line 7, characters 14-21:
# 7 |   (implements io-page)
#                   ^^^^^^^
# Error: Library implementation io-page for variant "unix" implements a library outside the project. This is forbidden.

Travis log:
https://travis-ci.org/mirage/io-page/jobs/550969705

PR for io-page that shows this problem:
mirage/io-page#59

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions