Build Dune Packages
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Currently, the way we build dune packages is by making dune spawn itself with dune build -p. For self evident reasons, this is rather inefficient. We spawn an extra process, create yet another _build directory and copy everything there, resolve all the public libraries, don't respect -j, etc.
What we could do instead is make dune setup the build rules for the downloaded sources and run them.
While the above would be ideal, the refactoring needed to achieve this would be enormous. A simpler solution which at least solves the -j problem is to create a job protocol like API over RPC and have the spawned dune use that.
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 by understanding the current dune package flow, especially how dune spawns itself with dune build -p and creates the extra _build directory. Study the proposed RPC job-protocol approach and the alternative of having dune set up build rules for downloaded sources. Done means addressing the duplicated build work while respecting -j.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100