ocaml / ocaml/dune

Uses-cases of generated dune files

Open
#3,901 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

See #3886

The idea for this issue is to gather different use-cases where we currently use generated dune files, with the aim of identifying some common patterns and see if we can provide a better workflow for them.

To get the ball rolling, this is how we use generated dune files at LexiFi:

  • generating stanzas for executables (that correspond to tests) listed in an external file (the file itself is static, not generated). The executables are run using a dedicated driver that collects running time, implements a timeout policy, etc so we can't use a simple test stanza for them.
  • generating stanzas for compiling C# executables. Some of the files referenced in the stanza (.dll and .cs sources) are listed in external files that are shared in a couple of different places.
  • generating copy or copy_files stanzas for files listed in external text files (some of which are generated because they depend on the system type). The list of files are also used in a couple of different places so they need to be shared.
  • generating rules for producing "output" files for each executable in a testsuite (the output files are then compared using a specialized program, so cannot use the usual "expect test" workflow). The list of tests and their characteristics are currently specified inside the OCaml script that generates the dune file.

cc @bobot

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

Start with issue #3886 and review the generated dune-file use cases listed here, including test executables, C# executables, copied files, and test output rules. Done means identifying common patterns and requirements that could support a better workflow; this issue does not name implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.