Re: [PATCH] meson: regenerate config-list.h when Documentation changes
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Feb 12, 2026, 08:10 UTC
- Message-ID
- <aY2K-_ZHyDBBh3_B@pks.im>
- In-Reply-To
- <CALnO6CB2KXUKdJ2nOOGLAe2fxkj+c5yF-f34dao=p6nTAEQwfQ@mail.gmail.com>
On Wed, Feb 11, 2026 at 02:58:27PM -0500, D. Ben Knoble wrote:
Show 35 quoted lines
> I'm not totally sure where the discussion ended up (what's actionable > isn't clear to me), but let me respond to at least this bit: > > On Wed, Feb 11, 2026 at 2:43 AM Patrick Steinhardt <ps@pks.im> wrote: > > > > On Mon, Feb 09, 2026 at 04:50:06PM -0500, D. Ben Knoble wrote: > > > > On Sat, Feb 07, 2026 at 04:59:17PM -0500, D. Ben Knoble wrote: > > [snip] > > > Only, things are behaving oddly. For example: > > > > > > λ meson setup build2 > > > λ ninja -C build2 > > > > > > works fine, but > > > > > > λ ls -l build2/config* > > > -rw-r--r-- 1 benknoble benknoble 17169 9 févr. 16:39 build2/config-list.h > > > > > > I don't see the dependency file. > > > > > Further, re-building seems to get stuck (I get > > > similar symptoms if I add or remove a relevant config.adoc file, but let's keep > > > it simple for now): > > > > > > λ ninja -C build2 > > > ninja: Entering directory `build2' > > > [1/28] Generating GIT-VERSION-FILE with a custom command (wrapped by meson to set env) > > > > With "stuck" you mean that it doesn't do anything, or that it doesn't > > actually rebuild? > > I mean, that's all the output I get, and the build seems unable to > make progress without the depfile present. Maybe I'm misreading the > above output, so let me try again with a different kind of change that > would cause recompilation:
I think you're simply getting confused by Ninja's output.
Ninja knows to short-circuit compilation in case regenerating a target that is used as input for another target will not cause the file to change. So what the "[1/28]" says is that we're regenerating the "GIT-VERSION-FILE", and if it would change we would have to recompile a bunch of other targets. But we see that it didn't change, and as a consequence we can skip compiling remaining targets.
Show 19 quoted lines
> > I guess it kind of makes sense that a new file wouldn't trigger a > > rebuild, even though I would have expected a removed one to trigger one. > > After all, the dependency file only tracks the set of _existing_ files > > so that we know when to rebuild, and of course the dependency file only > > gets regenerated in case any of those files changes. > > Trying this bit again, yeah, config-list.h doesn't get rebuilt if I do > `touch Documentation/fooconfig.adoc` (I think make would rebuild > though). And I can't tell if that's due to the weird [1/28] output or > due to something else, since I can't "see" if Meson recomputed the > depfile or not; with the depfile gone, it seems like there's nothing > present to tell Meson (ninja) when to rebuild, which is weird to me. > It seems this is expected, but it makes it difficult for me to tell > what's going on here. > > After `touch Documentation/config.adoc`, ninja executes 7 steps, > including rebuilding the config-list.h, at which point it also knows > to rebuild after touching "fooconfig.adoc" again. So maybe that's > expected?
I assume that you simply didn't have a depfile yet initially, and because the script itself isn't part of the deps Meson didn't know to reexecute it as it changed to gain support for the depfile.
Not sure though, but from all I can see things work as expected now with the current patch that you've sent.
Patrick