caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Louis Gesbert <louis.gesbert@ocamlpro.com>
To: caml-list@inria.fr, Francois Berenger <mlists@ligand.eu>
Cc: caml-list-request@inria.fr
Subject: Re: [Caml-list] LablGtk3 beta1
Date: Tue, 11 Dec 2018 12:34:50 +0100	[thread overview]
Message-ID: <2678986.C2DJzPsk9y@agaric> (raw)
In-Reply-To: <bb33b04ca2c710e8aa23ccdd52a33b7a@ligand.eu>

[-- Attachment #1: Type: text/plain, Size: 2143 bytes --]

> > An even worse problem is this case: imagine package A and B both depend
> > on gtksourceview, however package A requires version > 2.10 and package
> > B version > 2.11.
> 
> Oh, this one is an interesting question!
> 
> You are suggesting that opam should support the installation of 
> different versions of the same thing.
> I think nix can do that, and that indeed looks like a current limitation 
> of opam.

It is a limitation that has been explicitely put into opam, because of what the rest of the tooling requires. I made a more detailed explanation here: https://github.com/ocaml/opam/issues/3696

I don't believe that's what was suggested in the original message, though ? The pointed issue seemed to me that we don't handle detailed versions for `conf-*` packages, which means we can't encode precise dependencies to the underlying system package versions. In other words, _handling_ the fact that "package A requires version > 2.10 and package B version > 2.11" is no problem at all for opam, but _expressing_ it is, for `conf-*` packages.

The thing is that we can only detect the installed versions of system packages, not control them (even with `opam-depext`, we can trigger the installation of a given package, but most distributions don't allow to choose between multiple versions). In this case, you will have to rely on your package's `./configure` to fail when the version of the system dependency doesn't match, which is not the most helpful solution; adding the depexts to the package directly could help a bit, but again, as we don't control the system package version anyway, not that much.

There is one way we could improve a (little) bit: e.g. `conf-gtksourceview` could expose¹ a `system-version` variable upon installation, e.g. `2.11`, and then you could fail explicitely with a message directly from the opam file, without relying on `./configure` (it will still fail only at build time, though, because the value of the variable can't be known yet at resolution time).

Hope this helps,
Louis Gesbert — OCamlPro

¹ http://opam.ocaml.org/doc/Manual.html#dotconfigsection-variables

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-12-11 11:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06  6:33 Jacques Garrigue
2018-12-06 10:05 ` Louis Gesbert
2018-12-06 10:35 ` Gabriel Scherer
2018-12-07 10:04 ` Emilio Jesús Gallego Arias
2018-12-07 10:25   ` Gabriel Scherer
2018-12-07 18:34     ` Emilio Jesús Gallego Arias
2018-12-11  3:09       ` Francois Berenger
2018-12-11 11:34         ` Louis Gesbert [this message]
2018-12-14 11:41           ` Emilio Jesús Gallego Arias
2018-12-14 11:38         ` Emilio Jesús Gallego Arias
2018-12-16  8:12           ` Jacques Garrigue
2018-12-17 12:11             ` Emilio Jesús Gallego Arias
2018-12-18 14:33               ` David Allsopp
2018-12-19  1:20                 ` Emilio Jesús Gallego Arias
2018-12-19 10:15                   ` David Allsopp
2018-12-19 11:13                     ` Emilio Jesús Gallego Arias
2018-12-19 11:50                       ` David Allsopp
2018-12-19 16:41                         ` Emilio Jesús Gallego Arias
2018-12-20 11:33                           ` David Allsopp

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=2678986.C2DJzPsk9y@agaric \
    --to=louis.gesbert@ocamlpro.com \
    --cc=caml-list-request@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=mlists@ligand.eu \
    /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).