Skip to content

Mdx stanza doesn't work with multiple packages using opam #3267

@Risto-Stevcev

Description

@Risto-Stevcev

Expected Behavior

Trying opam install . -t -d should install as expected with the mdx stanza. The stanza works fine when developing locally with runtest.

Actual Behavior

It errors out with this when trying to build the first package (my_package):

File "dune", line 1, characters 0-91:
1 | (mdx
2 |  (files README.md)
3 |  (packages my_project my_project_async my_project_lwt))
Error: No rule found for alias .my_project_async-files
File "dune", line 1, characters 0-91:
1 | (mdx
2 |  (files README.md)
3 |  (packages my_project my_project_async my_project_lwt))
Error: No rule found for alias .my_project_lwt-files

Reproduction

Directory structure:

.
├ dune-project
├ dune
├ README.md
├ my_project/
   └ src/
      ├ dune
      └ Foo.ml
├ my_project_lwt/
   └ src/
      ├ dune
      └ Bar.ml
└ my_project_async/
   └ src/
      ├ dune
      └ Baz.ml

./dune-project:

(lang dune 2.4.0)
(generate_opam_files true)
(implicit_transitive_deps false)
(using mdx 0.1)
...

(package
  (name my_project)
  ...)
(package
  (name my_project_lwt)
  ...)
(package
  (name my_project_async)
  ...)

./dune:

(mdx
 (files README.md)
 (packages my_project my_project_async my_project_lwt))

./my_project/src/dune

(library
 (name my_project)
  ...)

./my_project_lwt/src/dune

(library
 (name my_project_lwt)
  ...)

./my_project_async/src/dune

(library
 (name my_project_async)
  ...)

Specifications

$ dune --version
2.4.0
$ ocamlc --version
4.10.0

I'm using Arch Linux:

$ uname -a
Linux ristoarch 5.4.13-arch1-1 #1 SMP PREEMPT Fri, 17 Jan 2020 23:09:54 +0000 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    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