From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q288VFW9009896 for ; Thu, 8 Mar 2012 09:31:24 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcDAJJtWE9QW+UDgWdsb2JhbABDhTSvcSIBARYmJ4IKAQEBAwEBAiAECwEiKQsLGAICGA4CAhAYFBsZG4doCQeoFpIugS+OKYEWBJIqcoIlkno X-IronPort-AV: E=Sophos;i="4.73,551,1325458800"; d="scan'208";a="134969756" Received: from plane.gmane.org ([80.91.229.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 08 Mar 2012 09:31:24 +0100 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S5Ykp-0005u1-9P for caml-list@inria.fr; Thu, 08 Mar 2012 09:31:19 +0100 Received: from ks368928.kimsufi.com ([94.23.39.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2012 09:31:19 +0100 Received: from sylvain by ks368928.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Mar 2012 09:31:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Date: Thu, 8 Mar 2012 08:31:08 +0000 (UTC) Message-ID: References: <1991A512A37E49ACA5AAD30A38D628BF@erratique.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ks368928.kimsufi.com User-Agent: slrn/pre1.0.0-18 (Linux) Subject: [Caml-list] Re: oasis packaging questions On 08-03-2012, Daniel Bünzli 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