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

Cannot generate the GTAGS at windows platform #327

Open
LeoZhang-ATMEL opened this issue May 19, 2022 · 5 comments
Open

Cannot generate the GTAGS at windows platform #327

LeoZhang-ATMEL opened this issue May 19, 2022 · 5 comments

Comments

@LeoZhang-ATMEL
Copy link

Describe the bug
Cannot generate the GTAGS files on windows, looks like this issue was caused by missing the plat/win32/update_gtags.cmd files.
image

It could be fixed by manually adding the missing file with the below content.

$ cat plat/win32/update_gtags.cmd
@echo off
setlocal EnableExtensions EnableDelayedExpansion
rem ==========================================
rem PARSE ARGUMENTS
rem ==========================================
set GTAGS_EXE=gtags
set GTAGS_ARGS=%~4
set INCREMENTAL=
:ParseArgs
if [%1]==[] goto :DoneParseArgs
if [%1]==[-e] (
set GTAGS_EXE=%~2
shift
goto :LoopParseArgs
)
if [%1]==[--incremental] (
set INCREMENTAL=--incremental
shift
goto :LoopParseArgs
)
echo Invalid Argument: %1
goto :Usage
:LoopParseArgs
shift
goto :ParseArgs
:DoneParseArgs
rem ==========================================
rem GENERATE TAGS
rem ==========================================
echo Running gtags:
echo call %GTAGS_EXE% %INCREMENTAL% %GTAGS_ARGS%
call %GTAGS_EXE% %INCREMENTAL% %GTAGS_ARGS%
echo Done.
goto :EOF
rem ==========================================
rem USAGE
rem ==========================================
:Usage
echo Usage:
echo %~n0 ^<options^>
echo.
echo -e [exe=gtags]: The gtags executable to run.
echo -L [cmd=]: The file list command to run
echo.

@zoumi
Copy link
Contributor

zoumi commented Jul 11, 2022

Why not create a PR?

@LeoZhang-ATMEL
Copy link
Author

PR created, #330

@dean-ho
Copy link

dean-ho commented Sep 1, 2022

I encounter same issue. Will it be fixed?

@retzzz
Copy link

retzzz commented Sep 29, 2022

I encounter same issue. But I remember when I use old version before the GTAGS can work.

@skywind3000
Copy link

please use my fork please: https://github.com/skywind3000/vim-gutentags
before my PR #336 get merged.

After 39dc3ee , gtags became unusable in gutentags because this commit requires a update_gtags.sh or update_gtags.cmd script to execute actual gtags command, but:

  1. update_gtags.sh lacks of execution permission on Linux.
  2. update_gtags.cmd is not provided.

So, after that commit, gtags is no longer usable in gutentags.

my update_gtags.cmd is modified from @LeoZhang-ATMEL 's version but add two thing:

  1. better argument parsing
  2. support newly added -L option.

phiysng added a commit to phiysng/vim-init that referenced this issue Nov 19, 2022
the origin version is broken on Windows , see ludovicchabant/vim-gutentags#327 (comment) for more details.
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

5 participants