ocaml / ocaml/dune

external-lib-deps --missing could suggest installing MDX for MDX stanzas

Open
#3,454 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cli enhancement mdx
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

When attempting dune build in a repository using MDX stanzas (with no external libraries initially available), the user gets an experience like the following:

  • run dune build;
  • fail due to libraries not available. run dune external-lib-deps --missing @@default;
  • run the suggested opam install ... command;
  • run dune build again;
  • fail due to missing mdx dependency for the MDX stanza, with a nice error message:
File "tests/dune", line 1, characters 0-45:
1 | (mdx
2 |  (files run.t)
3 |  (packages foo))
Error: Program ocaml-mdx not found in the tree or in PATH
 (context: default)
Hint: opam install mdx

This could be improved slightly by considering mdx as part of dune external-lib-deps @@foo if @foo will trigger an MDX stanza.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported workflow with the MDX stanza shown in tests/dune, starting with dune build and then dune external-lib-deps --missing @@default. Trace the external-lib-deps handling for targets that trigger an MDX stanza. Done means the generated missing-dependencies installation command includes mdx before the subsequent build.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.