Opened 13 years ago

Last modified 3 years ago

#31256 closed defect

ctags 5.8 creates improper tags file when compiled on OS X Lion — at Version 1

Reported by: echosa@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: lion Cc:
Port: ctags

Description (last modified by ryandesign (Ryan Carsten Schmidt))

So, as the summary says, ctags 5.8 creates improper tags files when compiled on OS X Lion using the Lion .dmg macports install. However, on Snow Leopard, compiled with the Snow Leopard version of macports, the created tags files are correct. The Lion-compiled ctags binary has the same issues on Snow Leopard, and the Snow Leopard-compiled binary works fine on Lion. (So right now, I'm just using a ctags binary compiled on Snow Leopard to get my work done on Lion.)

Here's the command I'm running from my project's root directory:

/opt/local/bin/ctags -e -f /path/to/TAGS -R --tag-relative=yes --totals=no --langmap=php:.php --exclude=.svn --PHP-kinds=+cf .

I'm running this on a PHP project, obviously. Also, you'll notice the -e flag, making the TAGS file etags compatible.

A proper etags reference should basically be of the format:

<file>,<size of tag entry>
<tag information>

A TAGS file will contain many of these.

Here's an example of what the ctags compiled with Snow Leopard is (properly) generating.

../../../Volumes/webdev/biosafety/trunk/application/Bootstrap.php,78
class Bootstrap extends Zend_Application_Bootstrap_BootstrapBootstrap33,719
(... extra lines here for the rest of this tag's information ...)

The important thing here is the path at the beginning.

The ctags compiled on Lion, however, doesn't always have this proper format. Sometimes the path will be /var/some/temp/path/somewhere or, more often, will be nonexistent, like this:

,78
class Bootstrap extends Zend_Application_Bootstrap_BootstrapBootstrap33,719
(... extra lines here for the rest of this tag's information ...)

Notice there is no file reference before the first comma. Note that not all of the tags references are bad. Some are proper, a few have paths to /var/somewhere, but the rest have no file reference at all.

FYI, the way I'm viewing these TAGS files is by loading them in emacs with visit-tags-table and switching to their buffer, which allows them to be seen in plain text.

Change History (1)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: ctags removed
Owner: changed from macports-tickets@… to mww@…
Port: ctags added

Please remember to use WikiFormatting, and to Cc the maintainer of the affected port.

Note: See TracTickets for help on using tickets.