Re: gnu global don't work properly with erlang

Shigio YAMAGUCHI <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <CADJmJYqb+iXgtJW2UiGDzjKa7tSC+JGHhjmcUuJT9AzDHJJ4bg@mail.gmail.com>
Hello,
> When I execute gtags in a erlang project, ctags report a warning,
> but the G-files still generated.

It may be solved if you use the latest Universal Ctags.

> The problem is: global can find definition, but not reference.
> "global -r" always print nothing. The GRTAGS file is also very small
> compared to GTAGS and GPATH.

Because the erlang parser in Universal Ctags does not pick up references.
In fact, Universal Ctags itself has reference facility. However, since
it is a recently implemented feature, the parser has not used it yet.

> When I execute gtags in a java project, it works correctly.

Because the buit-in parser is used.
With --explain option, you can see which parser is being used.

$ gtags -v --explain

Thank you for the report.

Regards
Shigio


2017-12-14 16:52 GMT+09:00 lhbaccount <[email protected]>:

> Environment:
>
> OS: Linux version 4.10.0-42-generic (buildd@lgw01-amd64-007) (gcc version
> 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5) ) #46~16.04.1-Ubuntu SMP Mon
> Dec 4 15:57:59 UTC 2017
>
> Global: global (GNU GLOBAL) 6.6
>
> I also installed universal-ctags in /usr/local and
>
>         export GTAGSCONF=/usr/local/share/gtags/gtags.conf
>         export GTAGSLABEL=builtin-first
>
> add 2 line to /usr/local/share/gtags/gtags.conf
>
> builtin-first:\
>         :tc=native:tc=new-ctags:
>
>
> ---------------------
> Command executed
>
> lisp@lisp:~/src/rabbitmq-server-v3_6_6$ gtags
>
> ctags: Warning: Unknown language         "c:.c.h,yacc:.y,asm:.s.S,
> java:.java,c++:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php:.php.php3.
> phtml,Ada:.adb.ads.Ada,Ant:(build.xml)(*.build.xml).ant.xml,
> Asm:.A51(*.29[kK])(*.[68][68][kKsSxX])(*.[xX][68][68]).asm.
> ASM,Asp:.asp.asa,Autoconf:(configure.in).ac,Automake:(Makefile.am
> ).am,Awk:.awk.gawk.mawk,Basic:.bas.bi.bb.pb,BETA:.bet,
> Clojure:.clj.cljs.cljc,C++:.cp.h++.hp.inl,CSS:.css,C#:.cs,
> ctags:.ctags,Cobol:.cbl.cob.CBL.COB,CUDA:.cu.cuh,D:.d.di,
> Diff:.diff.patch,DTD:.dtd.mod,DTS:.dts.dtsi,DosBatch:.bat.
> cmd,Eiffel:.e,elm:.elm,Erlang:.erl.ERL.hrl.HRL,Falcon:.fal.
> ftd,Flex:.as.mxml,Fortran:.f.for.ftn.f77.f90.f95.f03.f08.
> f15,gdbinit:(.gdbinit).gdb,Go:.go,HTML:.htm.html,Iniconf:.
> ini.conf,ITcl:.itcl,JavaProperties:.properties,
> JavaScript:.js.jsx,JSON:.json,LdScript:(*.lds.S)(ld.*).lds.
> scr.ld,Lisp:.cl.clisp.el.l.lisp.lsp,Lua:.lua,M4:.m4.spt,
> man:.1.2.3.4.5.6.7.8.9,Make:([Mm]akefile)(GNUmakefile).mak.mk
> ,MatLab:.m,Myrddin:.myr,ObjectiveC:.mm,OCaml:.ml.mli.
> aug,passwd:(passwd),Pascal:.p.pas,Perl:.pl.pm.ph.plx.perl,
> Perl6:.p6.pm6.pl6,PHP:.php4.php5.php7,pod:.pod,Protobuf:.
> proto,puppetManifest:.pp,Python:.py.pyx.pxd.pxi.scons,
> QemuHX:.hx,R:.r.R.q,REXX:.rexx.rx,Robot:.robot,RpmSpec:.
> spec,reStructuredText:.rest.reST.rst,Ruby:.rb.ruby,Rust:.rs,Scheme:.
> SCM.SM.sch.scheme.scm.sm,Sh:.sh.SH.bsh.bash.ksh.
> zsh.ash,SLang:.sl,SML:.sml.sig,SQL:.sql,SystemdUnit:.
> unit.service.socket.device.mount.automount.swap.target.
> path.timer.snapshot.scope.slice.time,Tcl:.tcl.tk.wish.
> exp,Tex:.tex,TTCN:.ttcn.ttcn3,Vera:.vr.vri.vrh,Verilog:.v,Sy
> stemVerilog:.sv.svh.svi,VHDL:.vhdl.vhd,Vim:(vimrc)([._]
> vimrc)(gvimrc)([._]gvimrc).vim.vba,WindRes:.rc,YumRepo:.repo
> ,Zephir:.zep,Glade:.glade,Maven2:(pom.xml).pom,PlistXML:.
> plist,RelaxNG:.rng,SVG:.svg,XSLT:.xsl.xslt" in "langmap" option
>
> lisp@lisp:~/src/rabbitmq-server-v3_6_6$ ls  -l G*
>
> -rw-r--r-- 1 lisp lisp  49152 12月 14 15:40 GPATH
> -rw-r--r-- 1 lisp lisp  16384 12月 14 15:40 GRTAGS
> -rw-r--r-- 1 lisp lisp 827392 12月 14 15:40 GTAGS
>
> When I execute gtags in a erlang project, ctags report a warning, but the
> G-files still generated. The problem is: global can find definition, but
> not reference. "global -r" always print nothing. The GRTAGS file is also
> very small compared to GTAGS and GPATH.
>
> When I execute gtags in a java project, it works correctly.
> _______________________________________________
> Bug-global mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/bug-global
>



-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.