[wg-windows] Removing the OPAM system switch on Windows
David Allsopp
dra-news at metastack.com
Sun May 29 10:25:58 BST 2016
My attempts to produce a full port of OPAM for native Windows continue, even
if out-paced by the progress of a snail! I'm at present implementing support
required for opam switch (bootstrapping/installing FlexDLL, etc.).
For anyone who hasn't had the pleasure of using OPAM yet, by default OPAM
creates one compiler switch called "system" representing the OCaml compiler
already installed on your system (usually by your OS's package manager).
OPAM can install libraries for this switch, but it does not build a compiler
(because it's already there) and there's a certain amount of trickery
associated with things like ocamlfind (which may, or may not, be installed
using an OS package).
Given the lack of a single "official" way to install OCaml on Windows, and
the fact that several organisations already have home-grown methods to have
multiple compiler installations co-existing, I'm wondering in the Windows
case if the "system" switch is far more effort than it's worth. My feeling
is that it would be better for opam init to switch to the latest version of
OCaml. So, at present, that would mean opam init were equivalent to opam
init --bare && opam switch 4.03.0. OPAM would never pay any attention to or
alter an installed system compiler, flexlink, etc. A keen user could choose
to install the system switch by manually creating it and installing the
ocaml.system package as its root.
Does anyone have any thoughts and/or opinions on why having the system
switch would be useful for native Windows too? It makes sense to keep it for
the Cygwin build of OPAM (naturally, since Cygwin has an OCaml package). The
only downside I can see at the moment is the delay it adds to opam init,
because building the compiler takes a while.
David
More information about the wg-windows
mailing list