ocaml / ocaml/dune

package managers wrapping dune must use release mode

Open
#1,801 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Many dune packages have a makefile that contains targets such as dune build. While opam packages do the right thing and specify -p and a package name in order to enable release mode, I suspect that many other OS package managers do not do this and simply wrap the Makefile.

There are a few things that'll help:

  • add a section to the dune docs on "Instructions for package managers" to explain the various dev/release profile options. There isn't a single one right now.
  • consider adding a DUNE_PROFILE environment variable that a generic wrapper such as dh_ocaml in Debian can set to release in order to force release mode for the package.

If release mode is not set, then the resulting binaries from the package manager will have cross-module inlining disabled.

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 the Dune documentation and the Makefile targets that invoke dune build, then trace how package-manager wrappers choose dev or release profiles. Done means documenting the profile options and defining how a wrapper such as Debian's dh_ocaml can select release mode through DUNE_PROFILE.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
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.