New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tag annot does'nt work #5226
Comments
Comment author: @xclerc Can you be a bit more specific? In latter case, it may be regarded as a bug but is consistent for example |
Comment author: daweil 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. |
Comment author: @xclerc [a temporary workaround is to copy every '.annot' file from the '_build' What do you think should be the behavior of ocamlbuild in this case? |
Comment author: @ygrek IMHO this is not the problem of ocamlbuild, but of an editor. E.g. vim plugin searches .annot files in _build directory too. |
Comment author: daweil 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? |
Comment author: @ygrek 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). |
Comment author: @xclerc I do agree that copying ".annot" file is against the philosophy So, which other options are on the table? I would incline to think that ygrek is right when stating that |
Comment author: daweil 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... |
Comment author: berenger It seems that recent GNU Emacs modes handle this properly I tried on Ubuntu squeeze/sid with |
Comment author: meyer berenger, thanks, I'm closing it. |
Original bug ID: 5226
Reporter: daweil
Assigned to: @xclerc
Status: closed (set by meyer on 2012-09-10T03:25:35Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: any
OS: any
OS Version: any
Version: 3.12.0
Target version: 4.00.1+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: mehdi @Chris00
Bug 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
add the folliwing line in your _tags file :
<**/*.ml>: annot
Compile : ocamlbuild main.byte
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.
The text was updated successfully, but these errors were encountered: