Re: Avoid circular header file dependency

2025-04-27 Thread Michael Paquier
On Sat, Apr 26, 2025 at 08:31:32AM +, Bertrand Drouvot wrote: > On Sat, Apr 26, 2025 at 04:42:56PM +0900, Michael Paquier wrote: >> Splitting the values >> of the wait classes into their own header makes sense, but the header >> name wait_class_constants.h sounds a bit off. Why not a simpler >

Re: Avoid circular header file dependency

2025-04-27 Thread Tom Lane
Bertrand Drouvot writes: > On Sat, Apr 26, 2025 at 02:55:51PM -0400, Tom Lane wrote: >> I think the actual problem is that plpython.h >> does this: >> >> /* >> * Used throughout, so it's easier to just include it everywhere. >> */ >> #include "plpy_util.h" > Agree. >> which is exactly the sort

Re: Avoid circular header file dependency

2025-04-27 Thread Bertrand Drouvot
Hi, On Sat, Apr 26, 2025 at 02:55:51PM -0400, Tom Lane wrote: > Bertrand Drouvot writes: > > On Sat, Apr 26, 2025 at 01:20:56AM -0400, Tom Lane wrote: > >> Whatever it contains, we need to kill it with fire before the problem > >> metastasizes like it did the last time. (yeah, yeah, badly mixed

Re: Avoid circular header file dependency

2025-04-26 Thread Tom Lane
Bertrand Drouvot writes: > On Sat, Apr 26, 2025 at 01:20:56AM -0400, Tom Lane wrote: >> 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

Re: Avoid circular header file dependency

2025-04-26 Thread Bertrand Drouvot
Hi, On Sat, Apr 26, 2025 at 04:42:56PM +0900, Michael Paquier wrote: > This one is my fault, I do feel guilty too... > Splitting the values > of the wait classes into their own header makes sense, but the header > name wait_class_constants.h sounds a bit off. Why not a simpler > "wait_classes.h

Re: Avoid circular header file dependency

2025-04-26 Thread Bertrand Drouvot
Hi, On Sat, Apr 26, 2025 at 01:20:56AM -0400, Tom Lane wrote: > Bertrand Drouvot 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. > > I don't have an o

Re: Avoid circular header file dependency

2025-04-26 Thread Michael Paquier
On Sat, Apr 26, 2025 at 01:20:56AM -0400, Tom Lane wrote: > Bertrand Drouvot 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 s

Re: Avoid circular header file dependency

2025-04-25 Thread Tom Lane
Bertrand Drouvot 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 16

Avoid circular header file dependency

2025-04-25 Thread Bertrand Drouvot
Hi hackers, 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. Those files have include guards but could still lead to compilation issues in some cases due to the circular dep