Re: GNOME goal candidates
- From: Sébastien Wilmet <swilmet gnome org>
- To: desktop-devel-list gnome org
- Subject: Re: GNOME goal candidates
- Date: Fri, 14 Apr 2017 15:26:20 +0200
On Wed, Mar 01, 2017 at 10:31:24AM +0000, Philip Withnall wrote:
On Tue, 2017-02-28 at 17:12 -0600, Michael Catanzaro wrote:
GtkBuilder validation looks like more gook to add to our Automake
files, when we really want less gook there. Even if it's only a small
amount of code, I'd rather it be implemented as an autoconf archive
macro and re-proposed. I'm not sure if it's really necessary anymore
anyway, since GTK+ almost always warns about XML problems at runtime,
right?
Who cares how much ‘gook’ we have in the build system? What we care
about is how useful it is. The value of adding validation for files at
build time is that it catches errors *at build time*, not at runtime if
a certain code path is taken. For GtkBuilder files, the usefulness of
this depends entirely on the project — if the project uses a single
massive .ui file, any errors in that are going to be caught when the
program is started. But if a project uses a separate .ui file for each
dialogue, you have to test every dialogue in the program at runtime
before you know all the .ui files are valid.
This is a textbook example of the tradeoff between build time and
runtime testing.
The example rules given on the goal page are not the tidiest. There is
a simpler way to do this:
https://git.gnome.org/browse/hitori/tree/Makefile.am#n95 (four lines)
https://git.gnome.org/browse/hitori/tree/configure.ac#n51 (two lines)
I don’t think that needs to be shipped out to an autoconf-archive macro
— including such a macro in a project would be two lines at the least,
so it would save a total of four lines. This one is better off being
cargo-culted.
So the general consensus was to approve this GNOME goal:
https://wiki.gnome.org/Initiatives/GnomeGoals/ValidateGtkBuilderFiles
provided that someone updates the instructions and the list of modules.
For the instructions, hitori currently does this: (with more
future-proof links):
https://git.gnome.org/browse/hitori/tree/Makefile.am?h=3.22.2#n95
https://git.gnome.org/browse/hitori/tree/configure.ac?h=3.22.2#n51
There is now also the gtk-builder-tool utility program (or
gtk4-builder-tool for GTK+ 4), which can also validate GtkBuilder files.
With gtk-builder-tool I wonder if xmllint is still necessary.
--
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]