From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id BD039BB84 for ; Fri, 26 Dec 2008 23:51:18 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApgBAODuVElRZ90wlGdsb2JhbACNM4Y5AQEBAQkLCAkRA6hbWI8chkQ X-IronPort-AV: E=Sophos;i="4.36,286,1228086000"; d="scan'208";a="18912471" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 Dec 2008 23:51:18 +0100 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20081226225118.TPOP4080.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Fri, 26 Dec 2008 22:51:18 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081226225118.JCRR21638.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com>; Fri, 26 Dec 2008 22:51:18 +0000 Received: from Countertenor (dyn-62-56-89-204.dslaccess.co.uk [62.56.89.204]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id mBQMpCnn029259 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 26 Dec 2008 22:51:15 GMT From: "David Allsopp" To: "'Jun Furuse'" Cc: References: <5160b4200812250547l35a1536fuf687d9e277999bd0@mail.gmail.com> <00a201c9674b$362aea00$a280be00$@com> <5160b4200812261134i72b81bb0vdee6ff0e6869c5cf@mail.gmail.com> In-Reply-To: <5160b4200812261134i72b81bb0vdee6ff0e6869c5cf@mail.gmail.com> Subject: RE: [Caml-list] [ANN] OCamlSpotter: OCaml compiler extension for source browsing, version 1.0 Date: Fri, 26 Dec 2008 22:51:12 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <00be01c967ac$751a3f20$5f4ebd60$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 thread-index: AclnkPbHaXhIBwXjQrC84d28LKECjgAFlLEg Content-Language: en-gb X-Scanned-By: MIMEDefang 2.64 on 81.102.132.74 X-Cloudmark-Analysis: v=1.0 c=1 a=tpzOqSeaNgEA:10 a=Ulc1cIAnboQA:10 a=u7--IdFb7YXILoZgFGYA:9 a=TtW_Bm0bgdBgTp0nHvr31uxN5MAA:4 a=3I_whO4B8K8A:10 a=lZSafI9srawINc4G:21 a=aj3lf0jdQl8ujnzb:21 X-Spam: no; 0.00; ocaml:01 compiler:01 furuse:01 ocamlc:01 compiler:01 bug:01 integers:01 marshaled:01 marshaled:01 compilable:01 foo:01 cmi:01 cmi:01 ocamlfind:01 ocaml:01 Jun Furuse wrote: > > > Sorry, but I do not think so: > > include List > let g = length > > ocamlc 3.11.0 with -annot never informs about length, included from > List. This is why a compiler patch is required at least for version > 3.11.0. This is a bug and should be reported in Mantis - [length] comes from an external file so there should be an ext_ref annotation in the .annot file. > > Besides this version specific reason, annot is a text and therefore it > > must be pretty-printed at creation and parsed back at the use. It is > > costly and sometimes files become very huge (few MBs sometimes). In > > addition, some very important properties for browsing such as the > > identifier stamp integers are simply lost at pretty printing and never > > be recovered at parsing. From these difficulties, rather than pretty > > printed, I think those information should be simply marshaled. > > Marshaled spot files are always smaller than annots, and loading is > > straightforward and pretty fast. Define costly! I've never noticed Vim's interpreted, probably non-optimised internal script language taking a significant amount of time to process the .annot files (many of which are several megabytes) for all of my sources every time I open the corresponding .ml file. > > It is a very interesting approach but I did not take it, firstly > > because this only works with compiled/compilable modules: it is often > > very handy to browse sources with errors, even they are just partially > > browsable. Secondly because I was (and am still) not very confident > > whether cm* files contain all the information I need for spotter. How much have you changed in the compiler? While compiling foo.ml, all external references are already compiled (or you'll get an error that the .cmi file for an interface is missing). The compiler also gives as much info in the .annot file for sources which contain errors already. Surely the .cmi file must contain enough information virtually by definition - it's all the compiler had to go on in the first place! > > OCamlFind is a great tool, but there are many people who are happy > > without it. My impression reading this list is that the majority of the community would like it included in the main OCaml distribution but let's not re-open that thread of discussion again ;o) If someone's willing to install a tool like ocamlspot involving, at present, a patched compiler then I'd imagine that they'd not have too much issue installing findlib too... David