Skip to content
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

Error while generating ctags file: #47

Closed
gblock0 opened this issue Oct 10, 2015 · 11 comments
Closed

Error while generating ctags file: #47

gblock0 opened this issue Oct 10, 2015 · 11 comments

Comments

@gblock0
Copy link

gblock0 commented Oct 10, 2015

Hi,

After updating I am getting this error. I tried setting the resolve symlinks to 1 and that didn't seem to work. Any idea what's going on?

Error while generating ctags file:
gutentags: File /Users/gregoryblock/.vim/cache/tags/Users-gregoryblock-stuff-tags doesn't appear to be a ctags file. Please delete it and run :GutentagsUpdate!.

That file does exist and when I delete it the first save works fine, but every subsequent one after gives me this error.

Thanks!

@smeyfroi
Copy link

Same here. Just updated, deleted tags, gutentags regenerated it, then get same error on saving files. tags is a real file at the project root, not a symlink.

The first line of tags is weird though:

vagrant@precise64:/geome$ head tags
!== /Users/steve/Development/geome/cloudchief/tmp/bundle/ruby/2.1.0/gems/coffee-script-source-1.7.1/lib/coffee_script/coffee-script.js  /^},n.prototype.compilePatternMatch=function(e){var... BLAH BLAH BLAH...
!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   1   /0=unsorted, 1=sorted, 2=foldcase/
... ETC ...

Is Gutentags suddenly prepending into the tags file instead of appending stuff?

@ferranpm
Copy link

I have the same problem.

> head tags
!       /home/ferran/Workspace/dotfiles/vim/plugin/mappings.vim /^    noremap ! :T $/;" m
!       /home/ferran/Workspace/dotfiles/vim/plugin/mappings.vim /^    noremap ! :VimuxRunCommand $/;"   m
!_TAG_FILE_FORMAT       2       /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED       1       /0=unsorted, 1=sorted, 2=foldcase/

The error comes from gutentags#ctags#generate function in ce4716a. ctags doesn't put tags starting with a bang after those "headers", so checking that might not be a good idea. Maybe the tags file sould be edited after creating/updating it to ensure there are no ! tags?

@ludovicchabant
Copy link
Owner

Yeah this check was a fix for #37, but it looks like not everybody's tags file starts with !_TAG_. I wonder why? Anybody has an idea?

In the meantime, I made the check optional with 3048bf9 so that will at least solve everyone's problem around here.

@ludovicchabant
Copy link
Owner

FYI this is my ctags --version on OSX:

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Dec  5 2013, 20:52:19
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

I also checked and Gutentags is still appending new stuff at the bottom of the tags file.

@smeyfroi
Copy link

Same version here:

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Mar 16 2015, 23:48:18
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

Problem is solved here: thanks for that.

Thanks also @ludovicchabant for the fabulous plugin: good work. :-)

@gblock0
Copy link
Author

gblock0 commented Oct 15, 2015

Same version:

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Mar 16 2015, 23:48:18
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

Just re-installed gutentags and I am still getting the tag format above the !_TAG_ lines. I even deleted the ! lines above and tried saving again, but it still happens.

I'm on Mac OS X 10.10.5, not sure if that makes a difference.

@ludovicchabant
Copy link
Owner

Interestingly enough, my version was compiled in 2013, but both of yours were compiled in 2015 (even though they're supposedly v5.8 in all cases). I wonder if the version is misleading, and there is really some difference between the binaries.

Sadly, AFAIK ctags is still hosted on Sourceforge, which is at this point listed as a potential malware infected website by most browser security plugins, and the Brew package for MacOSX is stuck to that 2013 version. Anybody knows where I could get a newer version?

@Coacher
Copy link
Contributor

Coacher commented Dec 2, 2015

You can get sources for exuberant-ctags from https://github.com/universal-ctags/ctags/commits/sourceforge

@wikimatze
Copy link

I also have problems with GutenUpdate, it gives me a black screen. But the plugin is working without any complains.

Here are my ctags/ctags-exuberant (don't know if I really need both) versions:

wm~/.vim [master] M % ctags-exuberant --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Oct  7 2014, 13:52:34
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex
wm~/.vim [master] M % ctags --version          
Universal Ctags Development(5d4c29b), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Dec 12 2015, 08:13:46
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +debug, +option-directory, +coproc

I install ctags with the following command: cd /tmp && git clone https://github.com/fishman/ctags.git && cd ctags && autoreconf && ./configure && sudo make && sudo make install maybe this can help.

@ludovicchabant
Copy link
Owner

Finally got around to fiddle with homebrew and get the new Universal-Ctags (which apparently is where Ctags went after SourceForge? Thanks @Coacher!). I still get the !_TAG lines first (only with now new version numbers and such).

Looks like it's a mystery... either way, I'll leave the tag-check step optional -- I don't care about it personally, it was a feature request from someone else. If other people need it I may either make the check string configurable, or try to figure out exactly what's going on. In the meantime I'll close this since it shouldn't be a problem anymore unless you want that check.

@Coacher
Copy link
Contributor

Coacher commented Jan 19, 2016

@ludovicchabant, you are welcome. Universal-ctags is an attempt to modernize the original exuberant-ctags. Among other things they have 'sourceforge' branch where the original code is preserved. Last time I checked universal-ctags team was working towards their first release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants