atom / symbols-view

Jump to symbols in Atom
MIT License
165 stars 115 forks source link

"No symbols found" in file view when opening Atom from Finder on Mac #177

Open cronco opened 8 years ago

cronco commented 8 years ago

This issue was "forked" from #173 at @50Wliu's suggestion.

Initially I thought the issue is mitigated by opening Atom in dev or safe mode, but @dperetti correctly pointed out that the bug doesn't reproduce if you start from the CLI, no --dev or --safe needed.

As mentioned in the bug above, I've also tried disabling other plugins, and it does not help. I'll try looking into the bug myself when I get some time.

50Wliu commented 8 years ago

Thanks for opening a new issue @cronco!

octalmage commented 8 years ago

I'm getting the same issue.

Mac: 10.11.4 Atom: 1.7.4 symbols-view: 0.112.0

I generated tags using ctags and the "Show all symbols in the project" option works, just not the "Show all symbols in current file" option.

It worked once or twice this morning, so I'm not sure what's different.

This has been an issue for a few weeks now. Thanks!

Edit: It does work when opened from the command line, so at least there's a workaround!

crucialfelix commented 7 years ago

Same for me: I always have to start from the command line.

This is a python project and I think the python that is activated at startup is the one used. But by what ? "symbols-view" ?

What generates the ctags ? It's awfully mysterious how that thing gets populated.

neko1990 commented 7 years ago

Atom launched from command line will inherit "TMPDIR" environment variable. $TMPDIR is used by ctags-darwin(provided by symols-view package) and sort(on your machine).

Here's how i validate this thought:

Open Atom from command line and Finder, and compare their process.env. Spot the "TMPDIR".

Check my $TMPDIR

echo $TMPDIR
/var/folders/qs/cv29d01x113b22rk1pyqxk0w0000gp/T/

Launch Atom from Finder, Watch the new process event by dtrace script , cmd-r:

/Users/neko1990/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-darwin --options=/Users/neko1990/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/symbols-view/lib/ctags-config --fields=+KS -nf - /Users/neko1990/mrrescue-1.02e/highscore_entry.lua
/Applications/Docker.app/Contents/MacOS/com.docker.frontend {"action":"vmstateevent","args":{"vmstate":"running"}}

Same step as above , but from command line:

/Users/neko1990/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-darwin --options=/Users/neko1990/Applications/Atom.app/Contents/Resources/app.asar.unpacked/node_modules/symbols-view/lib/ctags-config --fields=+KS -nf - /Users/neko1990/mrrescue-1.02e/highscore_entry.lua
sort -u -o /var/folders/qs/cv29d01x113b22rk1pyqxk0w0000gp/T//tags.rLcYef /var/folders/qs/cv29d01x113b22rk1pyqxk0w0000gp/T//tags.rLcYef
/Applications/Docker.app/Contents/MacOS/com.docker.frontend {"action":"vmstateevent","args":{"vmstate":"running"}}
martisj commented 7 years ago

So @neko1990 is this a bug resolution? Should we start atom from the command line to get symbols in our files?

neko1990 commented 7 years ago

@martisj IMHO, this issue related to Path environment variable is not inherited of atom. Be aware , workaround on that issue didn't work on my machine, this may due to violating the "Atom.app" signature (reference).

Launching Atom from command line is just another workaround. The bug-fix could be Atom someday properly set "TMPDIR" and other environment variables.

PS: Currently i use goto:file-symbol for file scope symbol navigation, which avoid using ctags but much slower.

adammenges commented 7 years ago

Getting the same issue here:

Atom: 1.11.1 macOS: 10.12

pugson commented 7 years ago

Still happens if I launch Atom from Finder. Works properly if I launch it from the terminal.

Atom: 1.14.1 OS X: 10.11.6

adammenges commented 7 years ago

fwiw still happening here too:

Atom: 1.14.1 macOS 10.12

nunoh commented 7 years ago

Exact same setup as @dubstrike and can confirm. This stop happening some release ago and then reappared, think with 1.14.

eyeman2006 commented 7 years ago

Same Issue here.

now with Atom 1.15.0 and macOS 10.12.4

collinjackson93 commented 7 years ago

I just encountered the same problem. Atom 1.17.0, OS X 10.12.3. This was very frustrating to debug because launching in safe mode works (because Atom is launched from the terminal), but disabling all packages and relaunching Atom does not.

docsteveharris commented 6 years ago

same problem 1.18.0 and macos 10.12.5, works fine from command line

luckyliaolei commented 6 years ago

1 year later, the bug is still there...

wzin commented 6 years ago

Same here.

ishiiii commented 6 years ago

I recently tried to learn Python programming for building trading bot. so I installed atom Python3 and this exact same issue happens, but in my case, I cannot use CMD+R even if I oped Atom from terminal. Can somebody please help me fixing this issue. It is so annoying.

OS:OSX 10.13.2(17C88) Atom:1.23.3 x64

crwecker commented 6 years ago

I am seeing the same issue. The .tags file shows the symbols that should be populating the "File Symbols" list, but I get a "No Symbols Found" message whether I launch from finder or the terminal.

OSX 10.13.3 (17D47) Atom 1.23.3 x64

ishiiii commented 6 years ago

I was so stupid to make that mistake. Please check you are typing correct key. On Atom for Mac, I was supposed to use Control+R to run the program, not CMD+R. If that doesn't fix your problem, I am not sure how to fix that issue....

msabramo commented 6 years ago

Same issue with Atom 1.25.0 x64 on OS X 10.12.6 Launching from CLI is a workaround.

chrisbranson commented 5 years ago

Same issue with Atom 1.30.0 x64 on OS X 10.13.6 Launching from CLI is a workaround.

GrayCatCode commented 5 years ago

I'm also having this issue, albeit I'm not running on Mac (not sure if you want to create another issue for this). I'm running Atom v1.30.0 on CentOS v7.5.1804 and I'm launching it via the Programming menu via the Atom desktop shortcut file in /usr/share/applications:

[Desktop Entry]$ Name=Atom$ Comment=A hackable text editor for the 21st Century.$ GenericName=Text Editor$ Exec=/usr/share/atom/atom %F$ Icon=atom$ Type=Application$ StartupNotify=true$ Categories=GNOME;GTK;Utility;TextEditor;Development;Programming;$ MimeType=text/plain;$ StartupWMClass=Atom$

Launching Atom from the command line doesn't fix the issue in my case.

meetaig commented 5 years ago

I'm also having this issue, albeit I'm not running on Mac (not sure if you want to create another issue for this). I'm running Atom v1.30.0 on CentOS v7.5.1804 and I'm launching it via the Programming menu via the Atom desktop shortcut file in /usr/share/applications:

Launching Atom from the command line doesn't fix the issue in my case.

same here. working from Linux Mint 18.1 and not many packages installed.

jpmvferreira commented 4 years ago

I also have the same issue, running Manjaro with 4.19 LTS kernel, Atom version is 1.43.

Used to work a few months ago, now it isn't.

Viech commented 4 years ago

I'm also experiencing this issue on Arch Linux for a bunch of weeks now. Just did a full system upgrade and reboot and the issue is still there. Deleting ~/.config/Atom and starting from CLI did not help. It's odd that symbols-navigator works just fine.