Re: Meson feedback as a user

Is it possible to add to the guidelines to write your meson file such that you check dependencies as soon as possible and fail early? I thought automatic optional dependencies were a lifesaver back in the days when I didn't have a current jhbuild tree at all times, configure took 5 minutes and I'd have to run it over and over again as each missing dependency failed, so I understand why people started using them in the first place. The best way to get them to disappear is to make them unnecessary...

Philip C.

On Fri, Nov 24, 2017, 07:04 Michael Catanzaro, <mike catanzaro gmail com> wrote:
All good guidelines!

On Fri, Nov 24, 2017 at 8:49 AM, Emmanuele Bassi <ebassi gmail com>
> - Try to avoid automatic feature detection; this makes it harder for
> distributors and continuous integration systems to identify the
> dependencies needed to build your project

I would use much stronger wording here. Automagic dependencies (meson's
auto dependencies) are *evil*, a huge number of GNOME projects used
them in their Autotools build systems, and believe some projects have
dutifully ported them over to their new Meson build systems. Please
pick reasonable true or false defaults for your project, and *fail the
build* if a dependency for a feature is missing. Make the user
explicitly disable the feature to proceed without the dependency. It's
really, really unkind to distributions, Gentoo users, and anyone
building your software to make features *silently disappear* if they
don't magically know to have a certain BuildRequires.

There are some *very rare* cases where automagic dependencies actually
do make sense. For example, WebKitGTK+ will automagically determine to
build with OpenGL ES support rather than OpenGL support if OpenGL ES is
available but not OpenGL, because in the end no feature is disabled,
and if you have one but not the other it's very likely that's the one
you intend to be used. But if neither one is installed, the build will
*fail* until you decide what to do: GL support will not just disappear
unless you explicitly turn it off.


desktop-devel-list mailing list
desktop-devel-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]