<div dir="ltr">Hello everyone,<div><br></div><div>We have been ranting at autotools for years now, and it's been a couple of years since we tried to get rid of them, so, let's try again, this time with the "new" kid on the block: meson (<a href="https://mesonbuild.com/">https://mesonbuild.com/</a>)</div><div><br></div><div>Some expectation management first:</div><div>- I'm not touching varnish-cache at the moment (but yes, eventually, that'd be the plan)</div><div>- instead, I tried my hand at vmod_digest and varnish-modules to collect feedback first</div><div>- I'm not here to take away your beloved build system, the two options can coexist</div><div><br></div><div>For the eager and curious, here's what it would entail code-wise:</div><div>- <a href="https://github.com/varnish/varnish-modules/compare/master...meson">https://github.com/varnish/varnish-modules/compare/master...meson</a></div><div>- <a href="https://github.com/varnish/libvmod-digest/compare/master...meson">https://github.com/varnish/libvmod-digest/compare/master...meson</a><br></div><div><br></div><div>So, let's start with the cons I found first:</div><div>- the syntax is not amazing, and feels a bit clunky at times</div><div>- it has some weird opinions about some apparently non-consequential stuff, but you can work around it if you really need to</div><div>- it's "not like autotools", but you don't make progress without breaking a few habits, or something like that</div><div><br></div><div>And that's about it. On the other hand, I saw quite a few benefits</div><div>- it's super boring, with very few install targets (build, test, install, clean, and that's about it)</div><div>- about test: they can be tagged so you can run a subset of them</div><div>- it's fast: varnish-modules goes from zero to everything build in less than seconds</div><div>- it's pretty complete and I was able to easily implement the vsc/vcc processing</div><div>- on that note, it support recipes with multiple outputs, unlike make</div><div>- while we can use subdir, it understand the full project as a whole, which would speed things up in varnish-cache</div><div>- there are only two dependencies: python that we need anyway, and ninja that doesn't need anything help</div><div>- the amount of "code" to write is way smaller than the autogen+configure+Makefile combo from autotools</div><div>- out-of tree builds are the default and only option, keeping the source tree pristin</div><div>- no need for "dist" tarballs, we can just do "git archive" and be done with it</div><div>- it's terse and doesn't bore you with pages of logs</div><div>- but the "-t graph" option creates a graphviz dependency graph, nice!</div><div>- it's only to commands: "meson yourdir" and "ninja -C yourdir"</div><div>- if you touch the meson.build file, no need to re-run the meson command, it's the same thing as if you edited a source file</div><div><br></div><div>Honestly, I'm sold, and I'm possibly seeing this with rosy glasses, so feel free to bring me back down to earth. I plan on merging the two PRs above soon, and to try to get some mileage from users (*cough* OpenSolaris *cough*) and maintainers both, but keeping autotools around for now.</div><div><br></div><div>If there's not too much outcry, I'd like to have a go at varnish-cache some time later (and if you are interested in helping with that fun little project, let me know).</div><div><br></div><div>Cheers!</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div></div></div>