Skip to content

Draft: Devtools: dedicated devtools opam switch

Context

Currently, the devtools (merlin, ocamlformat, odoc, utop, etc.) are installed in the same opam switch as the core dependencies (Lwt, irmin, data-encoding, etc.). As a result, the dependency version constraints from the devtools affect the update of the core dependencies. E.g., it may not be possible to upgrade a given core dependency because of a conflict with a devtool dependency. (This happens; it is not a theoretical consideration.)

Note that we are only interested in the binaries (and a few runtime files) from these dev dependencies. We do not care about link-time compatibility between our devtools and our core dependencies.

This MR introduces an opam switch dedicated to devtooling. IT IS EXPERIMENTAL.
Here's how to try it out locally.

Note: you can customise the set of devtools you want to install. Before you run make build-dev-deps, execute the following commands:

  • make -C devtools tools-list (sets the default)
  • $EDITOR devtools/tools-list (remove unneeded lines, add new ones)

Issues:

  • Does not remove tools when you re-run the make target after removing some tools.
  • Not tested on many computers, may not work, please let me know.

Companion MR on the opam-repo: opam-repository!331

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Raphaël Proust

Merge request reports