caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "François Bobot" <francois.bobot@cea.fr>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] META file standards for native plugins
Date: Thu, 09 Apr 2015 16:47:28 +0200	[thread overview]
Message-ID: <55269100.4000401@cea.fr> (raw)
In-Reply-To: <CAPFanBE=iVOV1sqqzTq9vpm35cjPJvoWNR5dKz4O5ftDVSOc8A@mail.gmail.com>

On 09/04/2015 15:27, Gabriel Scherer wrote:
> I don't understand the problem with the current semantics. The .cmxs will be linked when both
> predicates "archive" and "plugin" are true, and that seems correct to me (we use this when we want
> to link a *plugin* inside a *native* program). This is consistent with the use for example of
> (syntax,preprocessor,camlp4o) and (syntax,preprocessor,camlp4r) to select standard or revised
> syntax, or (syntax,toploop) when invoked from the toplevel. Also many packages currently use
> archive(byte,plugin) as well (which links to the .cma, just as with only archive(byte)).
>

When two sets predicate are incomparable you don't have the problem. The problem is when one is 
included in the other.

Just to recall, the semantic of ocamlfind define an applicable assignment as :

        *      An  assignment  can  only  be  used  if  all  positive formal predicates are
               included in the set of actual predicates, and if all negative formal  predi‐
               cates  are  not included in the set of actual predicates. Such an assignment
               is called applicable. If there is no such assignment, the variable will have
               no value.

When you ask for a set of predicate you want all the applicable assignment to make sense. If you ask 
for (syntax,preprocessor,camlp4o) you agree to receive the variable associated to 
(syntax,preprocessor) because it is more general. If you are compiling a multithreaded bytecode 
program the predicates are (byte, mt, mt_posix,...) you are happy to receive archive(byte).

But when you ask (plugin,native) you don't want to receive (native) because cmx can't be used for 
cmxs, so it should not be applicable. So you should not ask (plugin,native) but something 
incomparable with (native). Do you agree?

For bytecode, when looking for bytecode plugin we can ask for (byte,plugin) because we agree to 
receive (byte), and it is a good idea to allow people that have a specific version of their library 
for dynamic linking to define archive(byte,-plugin) and archive(byte,plugin). We can't use 
(byte,shared) because (shared) is then applicable.


-- 
François

      reply	other threads:[~2015-04-09 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 11:47 François Bobot
2015-04-09 13:27 ` Gabriel Scherer
2015-04-09 14:47   ` François Bobot [this message]

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=55269100.4000401@cea.fr \
    --to=francois.bobot@cea.fr \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    /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).