ocaml / ocaml/dune

add a way to exclude a folder from `default`/`all` without disabling that folder completely

Open
#9,692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is kind of related to #9690.

We have a sub folder of our monorepo in which we put experimental code. This code might not compile. Or it could compile, but requires to have a very specific environment to do so. Currently we can make sure that folder won't be built during a dune build at the root by using (dirs :standard \ experimental). But by doing that we make it impossible for someone to work on code that lives experimental.

It would be nice to have a softer exclusion than what dirs does. To have a folder which wouldn't be picked by dune build, which wouldn't expose its executables/libraries/ppx to the rest of the repo (while still being able to consume the exe/libs/ppx of the rest of the repo), but could still be built if necessary.

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 by reading related issue #9690 and tracing how (dirs :standard \\ experimental) affects root dune build and folder visibility. Define the behavior needed for default/all: experimental code is excluded and does not expose artifacts, while remaining able to consume the rest of the repository and be built explicitly. Done means this behavior is specified and covered for the described monorepo case.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.