<div dir="ltr"><div>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.)<br><br>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.<br><br></div>Thanks!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 30, 2016 at 4:52 PM, David Allsopp <span dir="ltr"><<a href="mailto:dra-news@metastack.com" target="_blank">dra-news@metastack.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-GB">
<div class="m_-7489197284500221426WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">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).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">David<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">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)<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_-7489197284500221426__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><u></u> <u></u></span></a></p>
<span></span>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> opam-devel [mailto:<a href="mailto:opam-devel-bounces@lists.ocaml.org" target="_blank">opam-devel-bounces@<wbr>lists.ocaml.org</a>]
<b>On Behalf Of </b>Gabriel Scherer<br>
<b>Sent:</b> 30 December 2016 17:07<br>
<b>To:</b> <a href="mailto:opam-devel@lists.ocaml.org" target="_blank">opam-devel@lists.ocaml.org</a><br>
<b>Subject:</b> [opam-devel] Multiple names for the same switch (aliases that are really aliases)<u></u><u></u></span></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi opam-devel,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Do I correctly understand that this feature is not possible in OPAM 1.2.x? (If it is, I may do it.)<br>
Is it possible in 2.x?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">(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.)<u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>