caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: "OCaml List" <caml-list@inria.fr>
Subject: [Caml-list] Experimental new layout for the ocaml-variants packages in opam-repository
Date: Thu, 19 Nov 2020 12:19:03 -0000	[thread overview]
Message-ID: <001d01d6be6e$2fb83650$8f28a2f0$@metastack.com> (raw)

[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


                 reply	other threads:[~2020-11-19 12:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001d01d6be6e$2fb83650$8f28a2f0$@metastack.com' \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).