Re: Converting tab-complete.c's else-if chain to a switch

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Converting tab-complete.c's else-if chain to a switch
Date: 2024-10-10 18:25:18
Message-ID: CAOYmi+=+oWAoi8pqnH0MJQqsSn4ddzqDhqRQJvyiN2aJSWvw2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tom,

Meson's coverage generation is unhappy with the new hardcoded #line
references emitted by gen_tabcomplete.pl:

genhtml: ERROR: cannot read
/home/jacob/src/postgres/worktree-oauth/build-dev/tab-complete.in.c

I've attached a potential fix which references $ARGV[0] instead, but
it's not really tested beyond "works for me".

While I was root-causing that, I also applied the following hunk to
align Meson's custom_target with the Makefile side:

@@ -27,8 +27,8 @@ tabcomplete = custom_target('tabcomplete',
input: 'tab-complete.in.c',
output: 'tab-complete.c',
command: [
- perl, files('gen_tabcomplete.pl'), files('tab-complete.in.c'),
- '--outfile', '@OUTPUT@', '@INPUT@',
+ perl, files('gen_tabcomplete.pl'), '@INPUT@',
+ '--outfile', '@OUTPUT@',
],
)

--Jacob

Attachment Content-Type Size
cov.diff application/octet-stream 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikael Sand 2024-10-10 18:26:18 Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding'
Previous Message Mikael Sand 2024-10-10 17:54:13 Re: Annoying build warnings from latest Apple toolchain