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

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: masao(dot)fujii(at)oss(dot)nttdata(dot)com, alvherre(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: make_ctags: use -I option to ignore pg_node_attr macro
Date: 2023-02-07 09:56:57
Message-ID: 20230207185657.c8a16d5ef67e5263e07b1fe5@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 07 Feb 2023 17:19:37 +0900 (JST)
Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:

> >> Since this commit, make_etags has started failing to generate
> >> tags files with the following error messages, on my MacOS.
> >>
> >> $ src/tools/make_etags
> >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ctags:
> >> illegal option -- e
> >> usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
> >> sort: No such file or directory
> >>
> >>
> >> In my MacOS, non-Exuberant ctags is installed and doesn't support
> >> -e option. But the commit changed make_etags so that it always
> >> calls ctags with -e option via make_ctags. This seems the cause of
> >> the above failure.
> >>
> >> IS_EXUBERANT=""
> >> ctags --version 2>&1 | grep Exuberant && IS_EXUBERANT="Y"
> >>
> >> make_ctags has the above code and seems to support non-Exuberant
> >> ctags.
> >> If so, we should revert the changes of make_etags by the commit and
> >> make make_etags work with that ctags? Or, we should support
> >> only Exuberant-type ctags (btw, I'm ok with this) and get rid of
> >> something like the above code?
> >
> > Thanks for the report. I will look into this.
>
> Previous make_etags relied on etags command:
>
> #!/bin/sh
>
> # src/tools/make_etags
>
> command -v etags >/dev/null || \
> { echo "'etags' program not found" 1>&2; exit 1; }
> :
> :
>
> My Mac (M1 Mac running macOS 12.6) does not have etags. Thus before
> the commit make_etags on Mac failed anyway. Do we want make_etags to
> restore the previous behavior? i.e. 'etags' program not found
>
> >> If so, we should revert the changes of make_etags by the commit and
> >> make make_etags work with that ctags?
>
> I think ctags on Mac cannot produce tags file for emacs.

Does is make sense to change make_etags as the attached patch does?
This allows make_etags to use etags if Exuberant-type ctags is not
available. This allows users to use make_etags if hey has either
Exuberant-type ctags or etags.

Regards,
Yugo Nagata

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

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
fix_make_etags.patch text/x-diff 891 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2023-02-07 10:03:46 Re: Supporting MERGE on updatable views
Previous Message Amit Kapila 2023-02-07 09:56:09 Re: Time delayed LR (WAS Re: logical replication restrictions)