On 08-03-2012, Daniel Bünzli <daniel.buen...@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-de...@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 -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs