ocaml / ocaml/dune

`(dirs ..` with paths of depth ≥ 2 are just ignored

Open
#5,313 1 comment 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

I have vendors/dune containing:

(dirs project1/src/lib2 project2/src/lib42)

And dune (2.9.1) just ignores them (cannot find those libraries).

I'd expect either:

  • that it just works (it's nice to be able to vendor libraries¹ without modifying nor adding dune files in their subtrees/submodules)
  • or that it throws a decent error message (which is what the data_only_dirs stanza does: it says "Error: only immediate sub-directories may be specified.")

(¹); I know about (vendored_dirs ..) but I want @check and @fmt to still work on the vendored libraries)

  • Version of dune (output of dune --version): 2.9.1
  • Version of ocaml (output of ocamlc --version): 4.12.0
  • Operating system (distribution and version): ubuntu-like

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 reproducing the nested-path behavior in a dune file using (dirs project1/src/lib2 project2/src/lib42) on Dune 2.9.1, then inspect handling of the (dirs ..) stanza alongside data_only_dirs. Done means nested paths are either honored for vendored libraries or rejected with a clear error, without losing the stated @check and @fmt behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.