tarides / ocaml-platform-installer

The best way for developers to write software in OCaml
ISC License
61 stars 8 forks source link

Should we consider all tools as `pure_binary`? #128

Closed panglesd closed 1 year ago

panglesd commented 2 years ago

The fact that some platform tools are not pure binaries, as is they include libraries, can be problematic: the version installed by the installer only contains binaries, so it differs from the complete version.

Due to this, we did not want to replace "original" packages: we name them differently (so that packages that depend on them install the true version) and never replace a true version by a platform one.

This will play terrible with the new with-dev-tools of opam 2.2 (https://github.com/ocaml/opam/issues/4959), and the "never replacing original package" has already given rise to #126.

Dune is considered a pure binary so it does not suffer from this problem (that would be a big problem since every package depending on it (almost all) would reinstall it). On the other hand, the following tools are currently considered "missing the libraries" in the installer:

I tend to think that we could consider all tools as "pure binaries", name them so that they can work as dependencies, and separate (or hide) libraries in another package.

(if we do this, then we can merge #127 without further hesitation!)

Julow commented 2 years ago

I completely agree! Ideally, every tools would expose their library into a separate package. (issue on ocamlformat: https://github.com/ocaml-ppx/ocamlformat/issues/2190)

I think we should move on with this idea. Fixing (generally) https://github.com/tarides/ocaml-platform-installer/issues/126 is more important than supporting the rare workflows of depending on ocamlformat's library, especially if we can change that. Also, with the new --with-dev-setup, our workaround will need to be improved so removing the cruft now won't hurt future development.

panglesd commented 1 year ago

Closed by #134