[wg-windows] Removing the OPAM system switch on Windows

Louis Gesbert louis.gesbert at ocamlpro.com
Mon May 30 11:17:44 BST 2016


Le dimanche 29 mai 2016, 10:25:58 David Allsopp a écrit :
>  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.

We are actually having the same question on Linux at the moment (due to the 
conflicting constraints "we don't want specific OCaml detection code in opam" 
and "we don't want dynamic packages"), and might fall back to having one pre-
defined "system" compiler per OCaml version, defined in the repository, and 
that you need to select manually (like for e.g. llvm). The current alpha 
provides a semi-dynamic `ocaml.system` package defined in its repository, that 
polls the system; but this has some drawbacks, mainly due to the fact that the 
variable `ocaml-version` (i.e. `4.03.0`) can't be known in advance and is 
different from the version of the `ocaml` package (i.e. `system`), so we can't 
properly resolve full installations including the compiler.

>  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.

Or just `opam init --compiler=ocaml.4.03.0` ;  a discussion is ongoing to make 
that the default on Linux too, see once again the issue discussion at 
https://github.com/ocaml/opam/issues/2537


More information about the wg-windows mailing list