caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: [Caml-list] Re: oasis packaging questions
Date: Thu, 8 Mar 2012 08:31:08 +0000 (UTC)	[thread overview]
Message-ID: <slrnjlgric.7tu.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <1991A512A37E49ACA5AAD30A38D628BF@erratique.ch>

On 08-03-2012, Daniel Bünzli <daniel.buenzli@erratique.ch> wrote:
> Hello,
>
> I'd like to support oasis in the various packages I distribute. Here are a few questions (using oasis v0.3.2~rc2). 
>
> 1) All the packages I distribute are made of a single module. For now these were just installed as .cmo .cmx .cmxs. Now it seems oasis forces me to create a .mllib even if I have only one module. Is that correct ? 
>

For now yes, but I plan to support only object through an Object
section, just like the Library:
https://forge.ocamlcore.org/tracker/?group_id=54&atid=294&func=detail&aid=790

> 2) Will the change in 1) have any impact for downstream packagers and is setup.ml enough for them ? 
>

The main change of .cmo -> .cma is that toplevel expression are only
evaluated if you open the module. This can be a problem if your .cmo are
used in a plugin way (i.e. toplevel expression register the content of
your library) and that you don't open it.

setup.ml will be enough for me ;-) But I am biased.

> 3) The META plugin doesn't seem to generate the directives for plugins [1], is that right ? Does setup.ml support cmxs generation at all ? 
>

We don't support plugin, indeed. Mostly because I was not aware of it.
setup.ml doesn't yet support .cmxs. I was looking at a patch provided by
Pierre Chambart yesterday evening to do that. Will probably be in 0.3.
https://forge.ocamlcore.org/tracker/?func=detail&group_id=54&aid=898&atid=293
https://forge.ocamlcore.org/tracker/?func=detail&group_id=54&aid=898&atid=293

> 4) I'm really not interested in oasis trying to generate my _tags and myocamlbuild.ml files. Is it ok to substitute my own or does setup.ml rely on these ? 

You can substitute your own. There should be no problem. Don't hesitate
to open a feature request to explain the reason why and your solution. I
don't promise it will be implemented, but it is worth understanding the
reason. 

>
> 5) One of the disadvantages of things like odb is that you may miss valuable information like a CHANGES file, proper documentation or sample programs. These are also things you actually would like to remove when you do a ocamlfind remove. Is there any general agreed on strategy for packages ? Best I think would be to install that along in the package directory with ocamlfind, it makes it relatively easy/evident to lookup. 

We already discuss this CHANGES file stuff. I still didn't have the time
to work on that, but it is something that I want. In future version
there should be something like that.

Use 'PostCleanCommand: rm XYZ'

DataFiles should do that. Concerning installing this using ocamlfind, I
am a little more skeptical. We use standard cp to install in
/usr/share/doc. I don't know a lot of libraries that install their
documentation in /usr/lib, probably because there are packaging rules
against that.

>
> 6) Regarding 5) I tried to define documentation as follows : 
>
> Document xmlm
> Title: "Xmlm documentation and module reference"
> Format: html
> Index: Xmlm.html 
> Install: true
> InstallDir: $htmldir/xmlm
> DataFiles: README CHANGES doc/*.html, doc/*.css
>
>
>
> but ocaml setup -install doesn't seem to install it. Of course this is also certainly a wrong strategy since it would install it in some directory that wouldn't be removed by ocamlfind remove. So how do we achieve that ? 
>

I think the default Type: for document is None, which means do nothing.
You can use "Type: Custom" and have a "XCustomInstall: cp XYZ
$htmldir/xmlm"

I realize that this no good. I probably should code a plugin Static, to
have "Type: Static" and use the data you fill in Document section to
install. This is not a long job.

Could you open a bug about that, so that it will remind me to do it ?

> 7) ocaml setup -install seems to install the modules' .mli, .cmi and .cmx by finding them in _build capitalizing the filenames even though they are not (cf. [2]). That works on my case insensitive filesystem, but it mustn't work on others, the original files are not capitalized !? Is that a bug ? 
>

That is a bug. I have similar problem with the Pack: when generating
_tags with capitalized module name. I installed ocaml on a mac yesterday
to find the right solution. It will be shipped with oais 0.3.0~rc3. But
this part of the bug is not extremly important, because on case
sensitive FS, it will replace the capitalize module name by the right
name. It is a runtime evaluation so no worries on this point.

Cheers,
Sylvain Le Gall

p.s.: please CC-me or oasis-devel@lists.forge.ocamlcore.org, I am not
that often reading caml-list lately
-- 
My company: http://www.ocamlcore.com
Linkedin:   http://fr.linkedin.com/in/sylvainlegall
Start an OCaml project here: http://forge.ocamlcore.org
OCaml blogs:                 http://planet.ocamlcore.org



  reply	other threads:[~2012-03-08  8:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08  0:26 [Caml-list] " Daniel Bünzli
2012-03-08  8:31 ` Sylvain Le Gall [this message]
2012-03-08 15:36   ` [Caml-list] " Daniel Bünzli
2012-03-08 20:13     ` Sylvain Le Gall
2012-03-08 20:59       ` Daniel Bünzli
2012-03-08 21:27         ` Sylvain Le Gall
2012-03-08 22:39           ` Daniel Bünzli
2012-03-09 11:56             ` Gerd Stolpmann
2012-03-09 13:53               ` Daniel Bünzli
2012-03-09 18:42           ` Daniel Bünzli
2012-03-09 19:11             ` Sylvain Le Gall
2012-03-09 19:49               ` Daniel Bünzli
2012-03-09 20:35               ` Daniel Bünzli
2012-03-09 21:06                 ` Sylvain Le Gall
2012-03-08 21:40       ` Adrien
2012-03-08 22:26         ` Sylvain Le Gall
2012-03-08 22:59           ` Daniel Bünzli
2012-03-09 12:22           ` Anil Madhavapeddy
2012-03-09 13:01             ` Wojciech Meyer
2012-03-12  0:38             ` Francois Berenger
2012-03-16 13:56     ` Damien Doligez
2012-03-08 16:09 ` [Caml-list] " Jérémie Dimino
2012-03-08 16:19   ` Gerd Stolpmann
2012-03-08 21:10     ` [Caml-list] " Sylvain Le Gall
2012-03-08 16:36   ` [Caml-list] " Daniel Bünzli
2012-03-08 16:58     ` Jérémie Dimino
2012-03-08 19:11       ` Daniel Bünzli
2012-03-09  6:40   ` Stéphane Glondu

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=slrnjlgric.7tu.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --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).