Subject: Re: [PATCH 7/8] meson: compile compatibility sources separately

From: Phillip Wood <[email-masked]>
Date: Mon, 16 Mar 2026 10:52:45 +0000

On 16/03/2026 08:09, Patrick Steinhardt wrote:
> On Fri, Mar 13, 2026 at 10:33:20AM +0000, Phillip Wood wrote:
>>
>> It does mean we're using different includes when compiling with pre-compiled
>> headers compared to compiling without them though which means contributors
>> using per-compiled headers could accidentally depend on functions that are
>> not included when compiling without them. Wasn't the idea behind
>> "compat/posix.h" to avoid including "git-compat-util.h" in the reftable
>> code? The commit message for 75a044f748f (git-compat-util.h: split out
>> POSIX-emulating bits, 2025-02-18) says
>>
>>      This intermixing is a bit of a problem for the reftable library as
>>      we don't want to recreate the POSIX-like interface there. But
>>      neither do we want to pull in the Git-specific functionality, as it
>>      is otherwise quite easy to start depending on the Git codebase
>>      again.
>>
>> We could precompile "compat/posix.h" for the code that does not want
>> "git-compat-util.h"
> 
> In theory, yes. But in practice we'd notice this quite fast via other CI
> jobs, and it feels a bit ugly to split out so many different libraries.
> So I'd propose to keep this as-is for now, but iterate in case we notice
> that it _does_ become a problem.

Fair enough, getting feedback via the CI when it could be given locally 
by the compiler isn't great but we don't expect this to be a common problem.

Thanks

Phillip

> Does that work for you?
> Thanks!
> Patrick