Usability issues with the way dune handles headers
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
I've looked over @aantron's luv library, and I noticed that there are too many contortions required to use C headers the way one wants. Even with all the contortions, one still does not get a desirable result. Here's a list of the issues:
-
To preserve the file structure of the headers (as is often required), one is required to write
installstanzas manually like here https://github.com/aantron/luv/blob/44db25c2b2669f9d1373377006a4d5850e0820e3/src/c/dune#L15 -
Introducing a dependency on the library to which the headers belong does not introduce a dependency on the headers. To depend on the headers, one has to add a
(package luv)dependency somewhere. -
When the package containing the headers is installed, things are still broken because dependencies aren't inferred correctly. Dune only adds dependencies on the header files in the root of the package, and omits dependencies on headers in sub directories.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked luv file, src/c/dune, and trace how Dune handles C-header installation and dependency inference. Done should address the listed cases: preserve header structure without manual install stanzas, infer header dependencies from library dependencies, and include headers in subdirectories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, ocaml
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100