Re: Improve docs syntax checking and enable it in the meson build

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: Improve docs syntax checking and enable it in the meson build
Date: 2026-02-16 12:22:24
Message-ID: CAN55FZ2G24SQn4p7sfGVMQm4E32D_LLv5DqDxdBvEDgvY017ig@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, 16 Feb 2026 at 13:49, Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear Nazir,
>
> > I see your point but the suggested change actually doesn't affect C
> > files' compilation. They are still built although you make this
> > change, AFAIK this is how meson build works.
>
> Did you say that C files would be anyway built even after applying my change?
> I don't think so - I have verified that only needed documents were built with
> the `meson test --suite doc` command after I modified meson.build.
>
> ```
> $ ninja clean
> [2/2] Cleaning
> Cleaning... 8 files.
> $ meson test --suite doc
> ninja: Entering directory `/home/hayato/builddir'
> [8/8] Generating doc/src/sgml/postgres-full.xml with a custom command // only 8 files are generated
> 1/1 postgresql:doc / doc/sgml_syntax_check OK 0.38s
>
> Ok: 1
> Expected Fail: 0
> Fail: 0
> Unexpected Pass: 0
> Skipped: 0
> Timeout: 0
>
> Full log written to /home/hayato/builddir/meson-logs/testlog.txt
> ```

I think we might be using different meson versions, which could
explain the difference. I am currently using meson v1.7.0.

1) With meson v1.7.0, it builds all files regardless of whether
"depends: postgres_full_xml" is added.

2) I also tested this manually and noticed a different behavior
starting from meson v1.9.2. In these versions, meson does not build
unnecessary files, whether "depends: postgres_full_xml" is added:

meson v1.9.1 without "depends: postgres_full_xml":

```
$ ninja clean && meson test --suite doc
[2/2] Cleaning
Cleaning... 0 files.
ninja: Entering directory `/home/nbyavuz/Desktop/projects/postgres/build'
[2551/2551] Linking target src/backend/postgres
1/1 postgresql:doc / doc/sgml_syntax_check OK 0.61s

Ok: 1
Fail: 0
```
------------------------------

meson v1.9.1 with "depends: postgres_full_xml", please note that 8
extra files are compiled because of postgres_full_xml [1]:

```
$ ninja clean && meson test --suite doc
[2/2] Cleaning
Cleaning... 0 files.
ninja: Entering directory `/home/nbyavuz/Desktop/projects/postgres/build'
[2559/2559] Linking target src/backend/postgres
1/1 postgresql:doc / doc/sgml_syntax_check OK 0.18s

Ok: 1
Fail: 0
```
------------------------------

meson v1.9.2 without "depends: postgres_full_xml":

```
$ ninja clean && meson test --suite doc
[2/2] Cleaning
Cleaning... 8 files.
1/1 doc - postgresql:doc/sgml_syntax_check OK 0.61s

Ok: 1
Fail: 0
```
------------------------------

$ meson v1.9.2 with "depends: postgres_full_xml", please note that 8
extra files are compiled because of postgres_full_xml [1]:
``
ninja clean && meson test --suite doc
[2/2] Cleaning
Cleaning... 8 files.
ninja: Entering directory `/home/nbyavuz/Desktop/projects/postgres/build'
[8/8] Generating doc/src/sgml/postgres-full.xml with a custom command
<- The difference [1]
1/1 doc - postgresql:doc/sgml_syntax_check OK 0.18s

Ok: 1
Fail: 0
```
------------------------------

If my observation is correct, it seems there may be no need to add
"depends: postgres_full_xml", since the test itself is about compiling
'postgres_full_xml', and it doesn’t need to be built separately
beforehand [1].

Please let me know if you are seeing something different on your side.

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2026-02-16 12:34:26 Add into REFRESH PUBLICATION parameter exception_behaviour
Previous Message VASUKI M 2026-02-16 12:19:53 Re: Optional skipping of unchanged relations during ANALYZE?