caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: "'Jun Furuse'" <jun.furuse@gmail.com>
Cc: <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] [ANN] OCamlSpotter: OCaml compiler extension for source browsing, version 1.0
Date: Fri, 26 Dec 2008 22:51:12 -0000	[thread overview]
Message-ID: <00be01c967ac$751a3f20$5f4ebd60$@com> (raw)
In-Reply-To: <5160b4200812261134i72b81bb0vdee6ff0e6869c5cf@mail.gmail.com>

Jun Furuse wrote:
> <snip>
> 
> 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


      reply	other threads:[~2008-12-26 22:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-25 13:47 Jun Furuse
2008-12-26 11:15 ` [Caml-list] " David Allsopp
2008-12-26 19:34   ` Jun Furuse
2008-12-26 22:51     ` David Allsopp [this message]

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='00be01c967ac$751a3f20$5f4ebd60$@com' \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jun.furuse@gmail.com \
    /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).