caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Experimental new layout for the ocaml-variants packages in opam-repository
@ 2020-11-19 12:19 David Allsopp
  0 siblings, 0 replies; only message in thread
From: David Allsopp @ 2020-11-19 12:19 UTC (permalink / raw)
  To: OCaml List

[With apologies for the delay between its being posted on Discuss and here]

The 4.12.0 alpha1 release is out and with it is an experiment for a new
layout for the ocaml-variants packages to try to reduce the number of
packages needed for each compiler release and also to allow packages to
depend on particular OCaml configurations.

There is a fuller history of the ocaml-variants packages and the changes
we're trialling in the Discuss post at https://discuss.ocaml.org/t/6779.
Please feel free to treat the initial Discuss post as a blog post and still
reply here on caml-list.

The headline change is that where before to install an flambda switch, you
would issue

  opam switch create ocaml-flambda ocaml-variants.4.11.1+flambda

you would now issue

  opam switch create ocaml-flambda
--packages=ocaml-variants.4.11.1+options,ocaml-option-flambda

(NB We're only doing this for the 4.12 packages at the moment; in opam 2.1
you get to drop the --packages and the comma).

Why are proposing to make the command line longer? Because you could then
access combinations which weren't available before, e.g. a 32-bit flambda
switch:

  opam switch create ocaml-flambda-32bit
--packages=ocaml-variants.4.11.1+options,ocaml-option-flambda,ocaml-option-3
2bit

and you could depend on certain OCaml configuration options. For example, if
your package definitely breaks with the no-naked-pointers mode, you could
conflict with ocaml-option-nnp (or, if your package only works in nnp mode,
you could depend on it). 

This could of course lead to surprises. You might wish to ensure that you
are building with flambda and could be caught out by a package installed
which conflicts with ocaml-option-flambda and so rebuilds the compiler
without it (possibly without your noticing). For this, we have added a
series of packages called prefixed ocaml-options-only-, e.g.
ocaml-options-only-flambda-fp. These packages allow only the options
specified (in this case, ocaml-option-fp and ocaml-option-flambda) and
conflict with all the others. Therefore if your switch base packages (or
switch invariant in opam 2.1) includes this package, then installing a
package which conflicts with ocaml-option-flambda will now fail, rather than
attempt to rebuild the compiler without the option.

As noted in Florian's announcement, we're experimenting with this layout for
the 4.12 pre-release packages and a decision will be taken prior to the
release of 4.12.0 as to whether we actually adopt this new scheme. Comments
and suggestions on any aspect of this are most welcome, in particular
whether we should backport the layout to previous releases of the compiler.

Happy (hopefully!) ocaml-variants hacking,


David


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-19 12:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 12:19 [Caml-list] Experimental new layout for the ocaml-variants packages in opam-repository David Allsopp

caml-list - the Caml user's mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/caml-list
	git clone --mirror https://inbox.ocaml.org/caml-list

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 caml-list caml-list/ http://inbox.vuxu.org/caml-list \
		caml-list@inria.fr
	public-inbox-index caml-list

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.caml-list


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git