|Anonymous | Login | Signup for a new account||2013-05-23 09:17 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005226||OCaml||OCamlbuild (the tool)||public||2011-02-17 18:11||2012-09-10 05:25|
|Target Version||4.00.1+dev||Fixed in Version|
|Summary||0005226: tag annot does'nt work|
|Description||because the file which is annoted is not the source file but the copy of the source file in the "_build" directory|
|Steps To Reproduce||1) add the folliwing line in your _tags file :|
2) Compile : ocamlbuild main.byte
3) Select a piece of code and type "C-c C-t" in emacs. Message "No annotation file : you should compile with option -dtypes" is printed instead of signature.
|Tags||No tags attached.|
Can you be a bit more specific?
Is the ".annot" file not generated, or generated but in the "_build" directory?
In latter case, it may be regarded as a bug but is consistent for example
with the way documentation is generated through ocamldoc.
edited on: 2011-02-22 12:20
Yes, it is generated but it is unusable as the only way to get the signature of a fonction in emacs by C-c C-t is to open the copy of the source file in the _build directory.
[a temporary workaround is to copy every '.annot' file from the '_build'
directory into your source directory after each build]
What do you think should be the behavior of ocamlbuild in this case?
Automate the aforementioned copy, create symbolic links, another option?
|IMHO this is not the problem of ocamlbuild, but of an editor. E.g. vim plugin searches .annot files in _build directory too.|
The workaround to copy .annot file into the source directory should work, but isn't it against the spirit of ocamlbuild which is to keep clean the source directory?
Do you mean that the editor should know where is the _build directory? (which is not necessary in the currrent directory) ?
How is it possible to tell emacs where is the _build directory?
This may be related to the other issue I have raised as "feature" for ocamlbuild :in a multi-directory project, how to call ocamlbuild from a sub-directory?
It would need some concept of "Root-directory" from which ocamlbuild is always called, and where the 'top' _tags file is define.
Emacs should be aware of this "Root-directory" for finding the .annot files.
|I for one prefer to work from the "root" directory. But editor could simply search all the hierarchy up to the fs root for the _build subdir (the same way as e.g. git finds .git subdir).|
I do agree that copying ".annot" file is against the philosophy
underlying ocamlbuild. Creating symlinks would be coherent
with documentation generation, but there would be a bunch
of such links.
So, which other options are on the table?
I would incline to think that ygrek is right when stating that
the problem is more likely to be handled by the editor.
The emacs/vi modes were designed before ocamlbuild came
to existence, and maybe updated to take the new tool into account.
Back with ocamlbuild and the -annot option: you're right. The correction should be in the editor, more precisely in the tuareg.el files. I had a quick look in it. It seems that the the correction could be somewhere in the "caml-types-preprocess" function of tuareg-el, but I'm not an emacs expert...
Why not transfering the bug to the tuareg project :http://tuareg.forge.ocamlcore.org/ [^]
It seems that recent GNU Emacs modes handle this properly
(the .annot files are looked for under the _build directory).
I tried on Ubuntu squeeze/sid with
ii ocaml-mode 3.11.2-1
ii tuareg-mode 1:1.45.6-2
|berenger, thanks, I'm closing it.|
|2011-02-17 18:11||daweil||New Issue|
|2011-02-21 15:55||xclerc||Status||new => assigned|
|2011-02-21 15:55||xclerc||Assigned To||=> xclerc|
|2011-02-21 15:58||xclerc||Note Added: 0005826|
|2011-02-21 15:58||xclerc||Status||assigned => feedback|
|2011-02-21 16:00||daweil||Note Added: 0005827|
|2011-02-21 16:01||daweil||Note Edited: 0005827|
|2011-02-21 16:05||xclerc||Note Added: 0005828|
|2011-02-22 11:42||ygrek||Note Added: 0005829|
|2011-02-22 12:20||daweil||Note Edited: 0005827|
|2011-02-22 12:29||daweil||Note Added: 0005830|
|2011-02-22 13:03||ygrek||Note Added: 0005831|
|2011-02-23 17:14||xclerc||Note Added: 0005832|
|2011-07-19 16:52||daweil||Note Added: 0006048|
|2012-02-02 15:17||protz||Category||OCamlbuild => OCamlbuild (the tool)|
|2012-07-10 15:26||doligez||Target Version||=> 4.01.0+dev|
|2012-07-18 02:58||berenger||Note Added: 0007772|
|2012-07-31 13:36||doligez||Target Version||4.01.0+dev => 4.00.1+dev|
|2012-09-10 05:25||meyer||Note Added: 0008043|
|2012-09-10 05:25||meyer||Status||feedback => closed|
|2012-09-10 05:25||meyer||Resolution||open => fixed|
|Copyright © 2000 - 2011 MantisBT Group|