Hi,
I’m looking for feedback on Split gobject-introspection-tests into git submodule (#489) · Issues · GNOME / gobject-introspection · GitLab.
tl;dr: gobject-introspection has a shared test suite for language bindings. I’d like to move the shared tests into their own git repository and use it as a submodule.
The way it works currently: g-i installs the source code for these tests into /usr/share/gobject-introspection-1.0/tests
. At build time, dynamic language bindings look for the .c
and .h
files in that location, and compile them locally into typelibs. Then they execute tests that call the functions in those typelibs, to exercise all the lovely edge cases
Why I want to change the way it works: the tests are tied to g-i’s release cycle, so if you want the latest tests you have to first wait for a point release, and then have installed bleeding-edge g-i. So mostly during development your language binding is going to be built by contributors who will run the tests against an earlier version of the typelib. So for a good contributor experience, you have to add a bunch of hacks to skip tests if they rely on things that aren’t present in the typelib. But then half the time contributors aren’t executing all the tests.
Also, it’s weird to compile installed source code like that.
Proposal: put these tests into a separate repo, import it as a submodule in any repo that wants to consume the tests, pin the submodule to a known-working commit, and update whenever the language binding wants to pull in new tests. The tests don’t need to be versioned or released.
Here’s a preview of what the new repo could look like: GNOME / gobject-introspection-tests · GitLab (warning: may be force-pushed at any time). See docs/provenance.txt
for repeatable instructions for creating this repo.
Sample branch of g-i using the repo as a submodule: WIP - gobject-introspection-tests (0ff209e6) · Commits · Philip Chimento / gobject-introspection · GitLab
Sample branch of gjs using the repo as a submodule: WIP - gobject-introspection-tests (d380cbc2) · Commits · Philip Chimento / gjs · GitLab
Downsides: Many people find git submodules confusing and unfamiliar.
Who is affected? Known consumers of these tests are g-i itself, gjs, pygobject, and perl-GLib-Object-Introspection.
Open questions:
- Any concerns about this plan?
- Am I missing some way this could affect downstream distributors?
- Is a git submodule okay, or would it be better for this to be a meson subproject?