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

coffeetags not found? #131

Closed
kaushalmodi opened this Issue Nov 21, 2014 · 15 comments

Comments

Projects
None yet
3 participants
@kaushalmodi

kaushalmodi commented Nov 21, 2014

Hi,

I don't use coffeescript and so I don't have to have coffeetags installed.

I get this error when I run "ctags --help"

$MY_USR_LOCAL//libexec/ctags/drivers/coffeetags: line 31: coffeetags: command not found

How can I make ctags not look for coffeetags?

Thanks.

@wikimatze

This comment has been minimized.

wikimatze commented Nov 22, 2014

I have the same issue:

sudo make install
cp -p ctags /usr/local/bin/ctags  &&  chmod 755 /usr/local/bin/ctags
cp -p ./ctags.1 /usr/local/share/man/man1/ctags.1  &&  chmod 644 /usr/local/share/man/man1/ctags.1
for c in ctags.ctags RFC1213-MIB.txt; do \
        cp -p ./data/corpora/$c /usr/local/share/ctags/corpora/$c && chmod 644 /usr/local/share/ctags/corpora/$c; \
    done
for c in coffee.ctags ctags.ctags mib.ctags rust.ctags ; do \
        cp -p ./data/optlib/$c /usr/local/share/ctags/optlib/$c && chmod 644 /usr/local/share/ctags/optlib/$c; \
    done
for c in coffee.ctags ctags.ctags mib.ctags rust.ctags ; do \
        echo "--options=$(basename $c .ctags)" >> /usr/local/share/ctags/preload/default.ctags; \
    done; \
    chmod 644 /usr/local/share/ctags/preload/default.ctags
for x in coffeetags; do \
        cp -p ./libexec/drivers/$x /usr/local/libexec/ctags/drivers/$x && chmod 755 /usr/local/libexec/ctags/drivers/$x; \
    done
cp -p readtags /usr/local/bin/readtags  &&  chmod 755 /usr/local/bin/readtags
wm/tmp/ctags [master]  % exec $SHELL
wm/tmp/ctags [master]  % ctags 
ctags: cannot open option file "/usr/local/share/ctags/optlib/coffee.ctags" : No such file or directory

But the coffee.tags file is there with the following content:

#
#
#  Copyright (c) 2014, Red Hat, Inc.
#  Copyright (c) 2014, Masatake YAMATO
#
#  Author: Masatake YAMATO <yamato@redhat.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
#
--langdef=coffee
--coffee-map=+.coffee
--coffee-xcmd=coffeetags

masatake added a commit that referenced this issue Nov 22, 2014

optlib: make default.ctags empty before generating it
This fix is related to a bug #131 reported by @wikimatze.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>

masatake added a commit that referenced this issue Nov 22, 2014

xcmd: extend xcmd protocol to deal with the case back-end command is …
…unavailable

This patch fixes a bug reported by @kaushalmodi in #131.
coffee xcmd driver dealt the error of coffeetags, its back-end command.
But it assumed coffeetags is always available. As the result it
tries to launch coffeetags command even if the command is not available.

In this change, coffee xcmd driver checks the available of back-end; and
report unavailability with special status code 77.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake

This comment has been minimized.

Member

masatake commented Nov 22, 2014

Thank you for spotting.
I fixed this in HEAD of master. Could you try again?

@wikimatze

This comment has been minimized.

wikimatze commented Nov 22, 2014

It is working, thanks for the fix. During the make install step I got the following warning:

options.c: In function ‘parseConfigurationFileOptions’:
options.c:2495:11: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
  asprintf (&filename,"/etc/%s.conf", filename_body);
           ^
options.c:2499:11: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
  asprintf (&filename,"/usr/local/etc/%s.conf", filename_body);
           ^
options.c: In function ‘parseConfigurationFileOptionsInDirectory’:
options.c:2367:11: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
  asprintf (&leafname,".%s",(Option.configFilename)?Option.configFilename:"ctags");

Do you plan to create tags for releases? I think not everybody wants to pull from master.

@kaushalmodi

This comment has been minimized.

kaushalmodi commented Nov 22, 2014

I am getting this error and I built it the same way after doing git pull.

lxcmd.o: In function `loadPathKinds':
/home/kmodi/downloads/git/ctags/lxcmd.c:292: undefined reference to `WIFEXITED'
/home/kmodi/downloads/git/ctags/lxcmd.c:292: undefined reference to `WEXITSTATUS'
collect2: ld returned 1 exit status
make: *** [ctags] Error 1
@masatake

This comment has been minimized.

Member

masatake commented Nov 22, 2014

@wikimatze, still many things before releasing. First of all I don't know how to create tar.gz or tar.xz; makefiles are assumed the source code is managed with svn.

masatake added a commit that referenced this issue Nov 22, 2014

xcmd: include types.h and wait.h to use WEXITSTATUS and WIFEXITED
This fixes a bug reported by @kaushalmodi in #131.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake

This comment has been minimized.

Member

masatake commented Nov 22, 2014

@kaushalmodi, Could you try the head again?

@kaushalmodi

This comment has been minimized.

kaushalmodi commented Nov 23, 2014

Works for me now. Thanks!

@kaushalmodi

This comment has been minimized.

kaushalmodi commented Dec 23, 2014

I don't get an error but I get this warning every time I run ctags:

ctags: Warning: xcmd recognizes /home/kmodi/usr_local2/libexec/ctags/drivers/coffeetags is not available

@kaushalmodi kaushalmodi reopened this Dec 23, 2014

@masatake

This comment has been minimized.

Member

masatake commented Dec 24, 2014

Could you show the output of

$ find /home/kmodi/usr_local2/libexec/ctags

?
ctags says it cannot find /home/kmodi/usr_local2/libexec/ctags/drivers/coffeetags.

@kaushalmodi

This comment has been minimized.

kaushalmodi commented Dec 24, 2014

The /home/kmodi/usr_local2/libexec/ctags/drivers/coffeetags file is
actually available.

Also, I don't work with coffeescript. I have this in my .ctags:

--languages=SystemVerilog,C,C++,HTML,Lisp,Make,Matlab,Perl,Python,Sh,Tex

Here's the output of the find command you suggested:

/home/kmodi/usr_local2/libexec/ctags
/home/kmodi/usr_local2/libexec/ctags/drivers
/home/kmodi/usr_local2/libexec/ctags/drivers/coffeetags

I get that warning even on doing ctags --version:

km²~/:> ctags --version
ctags: Warning: xcmd recognizes /home/kmodi/usr_local2/libexec/ctags/drivers/coffeetags is not available
Fishman Ctags Development, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Dec 23 2014, 14:17:33
  Addresses: , https://github.com/fishman/ctags
  Optional compiled features: +wildcards, +regex, +option-directory, +coproc
@masatake

This comment has been minimized.

Member

masatake commented Dec 24, 2014

Even if you set something in .ctags, the warning should not be printed if the code I wrote works as expected:-P. My code must works well even in environment where coffeetags is not installed.

Could you try following two commands?
$ /home/kmodi/usr_local2/libexec/ctags/drivers/coffeetags --list-kinds
...
$ echo $?
....

In my environment:
/var/tmp/libexec/ctags/drivers/coffeetags --list-kinds
/var/tmp/libexec/ctags/drivers/coffeetags --list-kinds
f function
c class
o object
v var
p proto
b block
[yamato@localhost]~/Downloads/kSar-5.0.7% echo $?
echo $?
0

@kaushalmodi

This comment has been minimized.

kaushalmodi commented Dec 24, 2014

The coffeetags --list-kinds command resulted in nothing, no display.
echo $? returned 77.

@masatake

This comment has been minimized.

Member

masatake commented Dec 25, 2014

Thank you. I have just remembered that the message means ctags cannot find coffeetags command.
You can ignore this message.

It is nice if you can disable coffeetags related configuration in .ctags, .ctags.d or somewhere.
However, the policy and mechanism of configuration files are still under discussion.

Instead I'm thinking about preparing --quiet option.
Some work is needed.

masatake added a commit that referenced this issue Jan 10, 2015

Merge pull request #195 from masatake/remove-code-using-stderr-directly
Remove code using stderr directly and introduce --quite option( #131)
@masatake

This comment has been minimized.

Member

masatake commented Jan 10, 2015

Try the code of HEAD; the warning message you reported will be suppressed with --quiet option.

@kaushalmodi

This comment has been minimized.

kaushalmodi commented Jan 12, 2015

Thanks it works!

This is probably not a big deal, but ctags --help --quiet does not work but ctags --quiet --help works as expected in quietening the warning.

I anyways added --quiet to my ~/.ctags so the above anomaly doesn't affect me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment