From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Avoid circular header file dependency |
Date: | 2025-04-26 05:20:56 |
Message-ID: | 2238517.1745644856@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> writes:
> While working on wait events I faced some compilation issues due to circular
> header file dependency (introduced in fa88928470b5) between wait_event.h and
> wait_event_types.h.
Ugh. I still carry the scars of cleaning up after a previous
circular-inclusion mess (cf 1609797c2), so I'm always worried about
introducing new cases. I don't have an opinion about whether this
specific refactoring is the best way to deal with this case, but
I definitely feel that we mustn't allow the situation to persist.
> Out of curiosity, I ran clang-tidy with misc-header-include-cycle ([1]) and it
> also reports:
> ../src/pl/plpython/plpy_util.h:9:10: warning: circular header file dependency detected while including 'plpython.h'
> This one worries me less because plpy_util.h only contains simple external
> function declarations.
Whatever it contains, we need to kill it with fire before the problem
metastasizes like it did the last time. (yeah, yeah, badly mixed
metaphors) I can take a look at this one over the weekend if nobody
beats me to it.
I am very glad to hear that there's a readily available tool to
catch such cases. We ought to run it every so often.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Jacobson | 2025-04-26 05:52:31 | Re: Sanding down some edge cases for PL/pgSQL reserved words |
Previous Message | jian he | 2025-04-26 04:00:46 | Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints |