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

ctag with space in path #44

Closed
MarekLew opened this issue Nov 11, 2017 · 3 comments
Closed

ctag with space in path #44

MarekLew opened this issue Nov 11, 2017 · 3 comments
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@MarekLew
Copy link

MarekLew commented Nov 11, 2017

Environment data

VS Code version: Code 1.18.0 (dcee2202709a4f223185514b9275aa4229841aa7, 2017-11-08T12:44:48.751Z)
Python Extension version: 0.8
Python Version: 2.17.2
OS and version: Ubuntu 16.04
$ ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
Addresses: dhiebert@users.sourceforge.net, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex

Actual behavior

Where project have space in path tags file in .vscode folder is not generate. visual studio code does not indicate a problem.

Windows (10) have similar problem.

Expected behavior

generate ctags when space is inside project path

Steps to reproduce:

code "/home/user/Desktop/repos/test space"

Test solution

when I in console write (relative path):

$ ctags --options=/home/user/.vscode/extensions/ms-python.python-0.8.0/resources/ctagOptions --languages=Python --exclude=**/site-packages/** -o ./.vscode/tags . 

then tags file is generate.

Logs

Output from Python output panel

ctags --options=/home/user/.vscode/extensions/ms-python.python-0.8.0/resources/ctagOptions --languages=Python --exclude=**/site-packages/** -o ./.vscode/tags .
ctags: cannot open tag file : No such file or directory

Output from Console window (Help->Developer Tools menu)
``

@MarekLew
Copy link
Author

Relations to #146

@brettcannon brettcannon added awaiting 1-verification bug Issue identified by VS Code Team member as probable bug labels Nov 14, 2017
@glutanimate
Copy link

glutanimate commented Nov 26, 2017

I can confirm that I'm experiencing the same issue on Ubuntu 14.04 and 17.04 with VS Code 1.18.1 / Python Extension 0.8. Generating the tags using a relative path, as stated in the original report, works for me.

My ctags version info is as follows:

$ ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Nov 26 2017, 16:38:57
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex, +internal-sort

(I tried recompiling ctags with the --disable-external-sort option, which some users had reported success with in other instances of ctags malfunctioning due to whitespace, but it didn't seem to have any effect in this case)

@brettcannon
Copy link
Member

I can verify this is a bug.

Using Build Workspace Symbols:

C:\Users\brettcannon\Downloads\ctags58\ctags58\ctags --options=C:\Users\brettcannon\.vscode-insiders\extensions\vscode-python\resources\ctagOptions --languages=Python --exclude=**/site-packages/** -o "c:\Users\brettcannon\Desktop\some bunk\.vscode\tags" .
ctags: cannot open tag file : Invalid argument

Copying and pasting the exact same command into PowerShell:

PS C:\Users\brettcannon\Desktop\some bunk> C:\Users\brettcannon\Downloads\ctags58\ctags58\ctags --options=C:\Users\brettcannon\.vscode-insiders\extensions\vscode-python\resources\ctagOptions --languages=Python --exclude=**/site-packages/** -o "c:\Users\brettcannon\Desktop\some bunk\.vscode\tags" .
PS C:\Users\brettcannon\Desktop\some bunk>

Maybe it's how we escape characters that we send to the terminal? I know that can be a bit tricky.

DonJayamanne pushed a commit that referenced this issue Jan 4, 2018
Fix fail to generate ctags when there is a space in the path. like #44 #146.

We don't need to handle space in the path when the path is passed to child_process.spawn as 'args' (not as the command).
@DonJayamanne DonJayamanne added this to the January 2018 milestone Jan 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants