From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E9D3F81792 for ; Mon, 8 Jul 2013 11:56:18 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of thomas.gazagnaire@gmail.com) identity=pra; client-ip=74.125.82.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="thomas.gazagnaire@gmail.com"; x-sender="thomas.gazagnaire@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of thomas.gazagnaire@gmail.com designates 74.125.82.172 as permitted sender) identity=mailfrom; client-ip=74.125.82.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="thomas.gazagnaire@gmail.com"; x-sender="thomas.gazagnaire@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f172.google.com) identity=helo; client-ip=74.125.82.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="thomas.gazagnaire@gmail.com"; x-sender="postmaster@mail-we0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqwBAFGM2lFKfVKsk2dsb2JhbABagzsBwS2BEBYOAQEBAQcLCwkUBCSCIwEBBAFAATgBAwELAQUFRjQBBQEcBogQAwkGBAibOY9MhA4nDYhLAQUMjyyDQWkDmHyEeolAP4Fdglw X-IPAS-Result: AqwBAFGM2lFKfVKsk2dsb2JhbABagzsBwS2BEBYOAQEBAQcLCwkUBCSCIwEBBAFAATgBAwELAQUFRjQBBQEcBogQAwkGBAibOY9MhA4nDYhLAQUMjyyDQWkDmHyEeolAP4Fdglw X-IronPort-AV: E=Sophos;i="4.87,1019,1363129200"; d="scan'208";a="24987398" Received: from mail-we0-f172.google.com ([74.125.82.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Jul 2013 11:56:14 +0200 Received: by mail-we0-f172.google.com with SMTP id q56so3542873wes.31 for ; Mon, 08 Jul 2013 02:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=QCI1xWnd1nLP/U6JSJV2D3Qx/wURfCZL5wY0EC/hWa8=; b=ioMiQFBi9xQjEtwt2JlAau+fe3qDfERgpEA6XSCvBQQQzIg1AOcEK5kNSwhzZ1QWmo KtCPtKQyy7DlGFBCycg2T24PEbMRkbn/Li5NARWoqnXuCNcXcAXykZhIXpUkMR9cX4KJ g5u/LLbVOnrVbMIxs9eWe3LR7Cd3NX4NFUfNuXgrK7JY5UJ+s0HKyjJ9uXOwxuFy95Ax +iaYpFt+0Y/uA/Pa4HN6J75YMcV1c2oR119cjsCuOiSvYG77acWzEQduCdgOz29MlqHK as1cY7y5FGfKxI8ZWlX/nklW5C88uTSXYTih/afSUJIx1ppm+C0Ff6qp+6oB21vn5OrN 9c6w== X-Received: by 10.194.8.163 with SMTP id s3mr11877131wja.41.1373277373990; Mon, 08 Jul 2013 02:56:13 -0700 (PDT) Received: from [10.35.194.130] ([213.30.181.210]) by mx.google.com with ESMTPSA id j20sm22644336wie.7.2013.07.08.02.56.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Jul 2013 02:56:13 -0700 (PDT) Sender: Thomas Gazagnaire Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 From: Thomas Gazagnaire In-Reply-To: Date: Mon, 8 Jul 2013 11:56:11 +0200 Cc: Dagnat Fabien , "caml-list@inria.fr" Content-Transfer-Encoding: quoted-printable Message-Id: References: <8D4165F2-D097-4497-AD9F-18AFA1E21266@telecom-bretagne.eu> To: =?iso-8859-1?Q?Daniel_B=FCnzli?= X-Mailer: Apple Mail (2.1085) Subject: Re: [Caml-list] =?WINDOWS-1252?Q?man=2C_doc=2C_=85_and_opam?= First of all, thanks Daniel for the precise answer. It seems that writing t= his damn developer manual was not so much of a waste of time after all :-) >> After reading the opam documentation, I'm not sure anything specific has= been done about the extra resources of packages (man and doc files for exa= mple). > Some things have been done, read section 1.2.5 of the developer manual. A= n install file allow you to specify exactly what to install and where in `b= in`, `doc` and `lib`.=20=20 >=20 > In fact this it can completely replace an `ocamlfind install` or `ocaml s= etup.ml -install`. Just make sure you add the `META` in `lib`, and `ocamlfi= nd` will find your package. >=20 > I also discovered that the `remove:` section with the usual `ocamlfind re= move PKG` is not needed. This is all due to the fact the IIUC `ocamlfind` = uses the file system as the database so there's no worry to bypass it in th= ese circumstances, opam will just remove the lib/PKG directory et voil=E0. This is not totally true. ocamlfind also install all the C stubs in `DESTDI= R/stublibs/dllPKG.so` and this is not removed automatically by OPAM (as it = currently has no good way to know the library name used by ocamlfind). So, = in this case, `ocamlfind remove PKG` does a bit more than removing DESTDIR/= PKG. OPAM has some mechanics to define internal libraries name (the field `libra= ry`) -- this was an early experiment to simulate basic functionalities of o= camlfind, so I guess we could reuse that field to declare which ocamlfind l= ibraries a given OPAM package contains. >=20 >> The only things, I found in the documentation is build-doc switch to ind= icate how to build the doc. For example, utop.1.5.opam contains >> build-doc: [ "ocaml" "setup.ml" "-doc" ] >>=20 >> I was expecting to find the doc of utop but on my .opam repository, the = doc directory of utop is empty. Furthermore, in the utop.install file there= is no doc command. > The problem is that apparently the utop package has a static .install fil= e in the package description and that this file doesn't list the things gen= erated by build-doc in the `doc:` section. As written in the manual section= mentioned above it's much better if the .install file is actually generate= d by the underlying build system according to the artefacts it has built. B= ut to the best of my knowledge none of the current build systems in use sup= port the generation of such a file (you can easily do it yourself though). Indeed, no build system currently supports this. At one point, we've starte= d to discuss the integration with oasis, obuild and ocp-build (with Sylvain= , Vincent and Fabrice), but currenlty none of these systems has implemented= that feature yet. The `.install` mechanics is not perfect yet (the file ne= eds to be at the root of the directory, and needs to be called PKG.install,= where PKG is the OPAM package name) but I've waited for feedback before im= proving this. > So the idea is that the `build:` section has commands that eventually gen= erate a file PKG.install in the root directory of your distribution and opa= m then uses that file to install the files associated to the package. (Unfo= rtunately the example of the online documentation uses an static .install f= ile added to the package description *itself* which makes it believe that t= his was the only way to use them). Indeed, the documentation is a bit misleading there, but to my defense, thi= s was supposed to be an advance usage of OPAM :-) >> More generally, my question also apply to man pages not found anywhere i= n the opam documentation. > I think the support is mostly right, the only thing that is missing is in= stall in man folders and a way to easily get to the doc directory of a part= icular package, instead of having to hunt in the .opam directory. This mean= s that we can put the README and CHANGES in there aswell for people to read. Indeed, this is clearly missing. I've created https://github.com/OCamlPro/o= pam/issues/674 to track this. >=20 > The conclusion of this is that the problem seems more to be that the inst= all file of most packages is crap rather than a lack of support from opam i= tself. Though the documentation about all this could be improved on the opa= m side aswell. Ack. We'll try to improve that before the next release (which unfortunately= has already been postponed too much). I've created https://github.com/OCam= lPro/opam/issues/675 to track this. Thanks for the feedback! Thomas