ocaml / ocaml/dune

behavior of `dune clean` is surprising/wrong when used with dune package management

Open
#12,976 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Motivation

This has been reported by many people over the last months, but it doesn't look like we have an issue to record it.

dune clean basically just deletes the _build directory. But we store information use for package management in the _build directory.

This leads to people trying to do a usual make clean equivalent, only to find that the package they were depending on (for tools or whatever) are suddenly gone.

Options

There are a few ways to address this

  1. change the logic of clean so it doesn't wipe out package data in _build
  2. change the location of package data so it goes somewhere else (e.g., in a _pkg directory)
  3. change the way clean is documented and how it communicates with users to anticipate/prevent this surprise

Most recently reported by @samoht earlier by @cuihtlauac

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 examining the current behavior of dune clean and how package-management information is stored in _build. Review the three options in the issue and the reported user expectations; done requires an agreed resolution that prevents package data from unexpectedly disappearing or clearly documents and communicates the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.