Re: make_ctags: use -I option to ignore pg_node_attr macro

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: make_ctags: use -I option to ignore pg_node_attr macro
Дата
Msg-id 20230612.111056.471221739183170466.t-ishii@sranhm.sra.co.jp
обсуждение исходный текст
Ответ на Re: make_ctags: use -I option to ignore pg_node_attr macro  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: make_ctags: use -I option to ignore pg_node_attr macro  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Список pgsql-hackers
Hi Sawada-san,

> In my Mac environment where non-Exuberant ctags and emacs 28.2 are
> installed, the generated etags file cannot be loaded by emacs due to
> file format error. The generated TAGS file is:
> 
> % head -10 TAGS
> 
>                                     ) /
> sizeof(BlockNumber)sizeof(BlockNumber)117,3750
>                                                                 my
> @newa newa395,10443
> 
> variadic array[1,2]:array[1,2]56,1803
> 
> variadic array[]::inarray[]::i72,2331
> 
> variadic array[array64,2111
> 
> variadic array[array68,2222
> 
> variadic array[array76,2441
>                                                           (2 *  (2 53,1353
>                                                         my $fn fn387,10147
>                                                         startblock 101,4876
> 
> Since the etags files consist of multiple sections[1] we cannot sort
> the generated etags file. With the attached patch, make_etags (with
> non-Exuberant ctags) generates a correct format etags file and it
> works:
> 
> % head -10 TAGS
> 
> /Users/masahiko/pgsql/source/postgresql/GNUmakefile,1187
> subdir 7,56
> top_builddir 8,65
> docs:docs13,167
> world-contrib-recurse:world-contrib-recurse19,273
> world-bin-contrib-recurse:world-bin-contrib-recurse24,394
> html man:html man26,444
> install-docs:install-docs29,474
> install-world-contrib-recurse:install-world-contrib-recurse35,604
> 
> BTW regarding the following comment, as far as I can read the
> Wikipedia page for ctags[1], Exuberant ctags file doesn't have a
> header section.
> 
> # Exuberant tags has a header that we cannot sort in with the other entries
> # so we skip the sort step
> # Why are we sorting this?  I guess some tag implementation need this,
> # particularly for append mode.  bjm 2012-02-24
> if [ ! "$IS_EXUBERANT" ]
> 
> Instead, the page says that sorting non-Exuberant tags file allows for
> faster searching on of the tags file. I've fixed the comment
> accordingly too.
> 
> Regards,
> 
> [1] https://en.wikipedia.org/wiki/Ctags#Etags_2

Sorry for late reply and thanks for the patch!

I have confirmed the error with make_etags on my Mac (emacs 28.1 +
non-Exuberant ctags), and the error is fixed by your patch. Also I
have confirmed the patch does not affect make_etags on my Linux (emacs
26.3 + Exuberant ctags).

I will push the fix to REL_15_STABLE and master branch if there's no
objection.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Wei Wang (Fujitsu)"
Дата:
Сообщение: RE: Support logical replication of DDLs
Следующее
От: James Coleman
Дата:
Сообщение: Re: Parallelize correlated subqueries that execute within each worker