Skip to content

MDX stanza executable fails to build with (implicit_transitive_deps false) #5499

@craigfe

Description

@craigfe

Building the executable generated by the MDX stanza fails when implicit transitive dependencies are disabled due to an implicit dependency on the mdx.top library:

  $ cat >dune-project <<EOF
  > (lang dune 3.0)
  > (using mdx 0.2)
  > (implicit_transitive_deps false)
  > EOF

  $ cat >markdown_file.md <<EOF
  > ```ocaml
  > # print_endline "Hello world" ;;
  > ```
  > EOF

  $ cat >dune <<EOF
  > (mdx
  >  (files markdown_file.md))
  > EOF

  $ dune build
  File "mdx_gen.ml-gen", line 28, characters 2-19:
  28 |   Mdx_top.Directory path) []
         ^^^^^^^^^^^^^^^^^
  Error: Unbound module Mdx_top
  Hint: Did you mean Mdx_test?
  [1]

Adding mdx.top as an explicit dependency of the stanza fixes the issue:

  $ cat >dune <<EOF
  > (mdx
  >  (files markdown_file.md)
  >  (libraries mdx.top))
  > EOF

  $ dune build

CC @NathanReb.

Reproduction

Included in #5500.

Specifications

  • Version of dune (output of dune --version): 3.03
  • Version of ocaml (output of ocamlc --version): 4.10.0
  • Operating system (distribution and version): Arch Linux (5.15.12-arch1-1)

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