[Github-comments] [geany/geany] Add Ocaml ctags parser (PR #3163)

Jiří Techet notifications at github.com
Fri Apr 15 12:11:39 UTC 2022


> Where does that happen? AFAICT runner.sh doesn't copy the source file, it just puts the tagfile in a temporary directory?

Just had a look and it's actually Geany itself:

https://github.com/geany/geany/blob/df27d1b226bd7261be5482b06d3a69123ff0c514/src/tagmanager/tm_workspace.c#L576

Note that the code is very c/c++ specific and the `includes` parameter of the function is actually source files passed on the Geany command-line. When these are really include files, it creates a new file containing `#include "file"` for all the includes which it then pre-processes with gcc.

When these aren't include files, it combines all source files into a single temporary file which it then parses. This appears to be really stupid because, first, creation of the temporary file is unnecessary, but second, worse, the concatenated file may not be syntactically valid for the given language. I'll look into this and try to fix it by parsing the files one by one and combining the tags.

> Personally I would have disabled the tests not the parsing.

Then there couldn't be any tests for ocaml because the module tag is generated for every file which isn't ideal either. But as I said above, this should be fixable.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3163#issuecomment-1100068776
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3163/c1100068776 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220415/e95e262d/attachment.htm>


More information about the Github-comments mailing list