ocaml / ocaml/dune

`$ dune install` shouldn't install to opam prefix

Open
#8,844 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

$ dune install is currently defaulting to install in the opam prefix. This is problematic because it's modifying the switch state without updating the switch state.

There's a few ways to address this problem:

  1. Warn the user when this is happening. This is the least we can do for now.
  2. In dune 4.0, stop install to the opam prefix completely. There's really no need for it in the first place. If the user has opam installed, they also have opam-installer which can do the same thing.
  3. dune install can use opam-installer under the hood when installing to the opam switch

cc @rjbou

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

The issue names no files or tests. Start by tracing the $ dune install entry point and how it selects the opam prefix; review the discussion of warning, removal, or opam-installer integration, then define tests for the chosen behavior and verify that the switch state is not changed silently.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.