[opam-devel] Multiple names for the same switch (aliases that are really aliases)

Gabriel Scherer gabriel.scherer at gmail.com
Fri Dec 30 21:56:52 GMT 2016


Oh, I'm not trying to get the system to automatically determine what the
best (last) version is, I am fine with doing it by hand. (And it is
probably wiser, if we were to release, say, 4.04.1~beta tomorrow.)

The rest of your description sounds like what I expected indeed, and I
hadn't thought deeply about the upgrade situation but it sounds very nice.

Thanks!

On Fri, Dec 30, 2016 at 4:52 PM, David Allsopp <dra-news at metastack.com>
wrote:

> In opam 2.0, it should definitely be possible to do it with a kind of
> dummy package which has a version constraint on the underlying OCaml
> package holding the appropriate ocaml package below the next version (e.g.
> < 4.03.0 for the 4.02 channel – there might be a cleverer constraint than
> that even, IIRC). Each major version would correspond to a version of the
> package (say ocaml-branch.4.02 or something) which you’d then pin at that
> version. A neat side-effect is that if a new maintenance release were made,
> the switch would be upgradable. It would also not require maintenance,
> beyond adding new major release versions.
>
>
>
> It’s not aliases, but would it do what you’re after? All of that’s
> impossible in OPAM 1.x – the best bet there would be to have an opam-admin
> script which can process the compilers directory and re-generate the branch
> packages (something similar to Anil’s script for the GPRs).
>
>
>
>
>
> David
>
>
>
> PS My strange patching work means I do keenly remember all point releases
> since 3.07 – who released 4.03.1 without telling me ;o)
>
>
>
> *From:* opam-devel [mailto:opam-devel-bounces at lists.ocaml.org] *On Behalf
> Of *Gabriel Scherer
> *Sent:* 30 December 2016 17:07
> *To:* opam-devel at lists.ocaml.org
> *Subject:* [opam-devel] Multiple names for the same switch (aliases that
> are really aliases)
>
>
>
> Hi opam-devel,
>
> A few weeks ago I discussed with Jeremy Yallop the idea of having switches
> for major OCaml versions (4.01, 4.02, 4.03...) that would point to the
> currently-best minor version of them (do you remember? 4.01.0, 4.02.3,
> 4.03.1).
>
> I would be willing to invest the effort of doing that and maintaining this
> mapping, but I feel that just creating new switches is too heavy-handed to
> be useful. If I already have a 4.02.3 switch, I would like "opam switch
> 4.02" to bring me to that switch, not install a new, distinct one with name
> 4.02 that would in fact install the same compiler as 4.02.3.
>
> Do I correctly understand that this feature is not possible in OPAM 1.2.x?
> (If it is, I may do it.)
> Is it possible in 2.x?
>
> (Louis: I do distinctly remember your call to try out 2.x at ICFP and I
> feel guilty about not having done much yet. Apologies.)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/opam-devel/attachments/20161230/cbb586fd/attachment-0001.html>


More information about the opam-devel mailing list