FS#67651 - [atom] symbol-view package not working due to ctags package not generating proper output

Attached to Project: Community Packages
Opened by Marc (mso) - Thursday, 20 August 2020, 16:03 GMT
Last edited by Morten Linderud (Foxboron) - Monday, 16 November 2020, 21:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Nicola Squartini (tensor5)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When opening the symbols-view package on a file on Atom editor (Ctrl+r) it shows "No symbols found" message.
The symbols-view is an Atom package installed by default when installing the Atom edit.

Behind the scenes the symbols-view package is calling the ctags command and reads its output. The ctags packages shipped with Arch does NOT output anything (don't know the reason).
However, the symbols-view, in its git repository, has a vendor folder with a file called ctags-linux (https://github.com/atom/symbols-view/tree/master/vendor).

This "vendor" folder is not part of the Atom package in Arch. However, if I manually download the file and execute it with the same parameters as symbols-view does this one works perfectly fine.

As a workaround I modified the file tag-generator.js from the symbols-view package to point the ctags command to the file I downloaded from symbols-view repo.

Steps to reproduce:
Open a source code file in Atom editor an press Ctrl+r: it shows "No symbols found"

Also, in order to try ctags output from command line, you might try the following:
ctags --options=/usr/lib/atom/node_modules/symbols-view/lib/ctags-config --language-force=Python --fields=+KS -nf - <path_to_a_source_code_file>

When using the system wide ctags package it just outputs some warnings. However, when using the executable ctags-linux found in symbols-view repo it correctly shows the ctags expected output.

This task depends upon

Closed by  Morten Linderud (Foxboron)
Monday, 16 November 2020, 21:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.51.0-2
Comment by Marc (mso) - Monday, 24 August 2020, 07:39 GMT
Some comments that might be helpful:

Ctags version shipped with Arch (as of 2020-08-24):
Universal Ctags 0.0.0(a3c87ab5), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Jan 7 2020, 22:54:55
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc


Ctags executable at symbols-view in GIT's repository (vendor folder):
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Nov 9 2011, 17:42:21
Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex


Only the later works as intended.

Comment by Nicola Squartini (tensor5) - Tuesday, 06 October 2020, 01:27 GMT
It seems like the problem is the configuration in /usr/lib/atom/node_modules/symbols-view/lib/ctags-config which Universal Ctags doesn't like. It works if you don't pass any configuration.
Comment by Nicola Squartini (tensor5) - Tuesday, 06 October 2020, 02:28 GMT
Try 1.51.0-2.