Skip to content

build: handle GLib 2.88 lgi enum-class break#590

Merged
JimmyCozza merged 1 commit into
mainfrom
fix/lgi-check-message
May 26, 2026
Merged

build: handle GLib 2.88 lgi enum-class break#590
JimmyCozza merged 1 commit into
mainfrom
fix/lgi-check-message

Conversation

@JimmyCozza
Copy link
Copy Markdown
Contributor

Description

On GLib 2.88, an lgi without the upstream fix (lgi-devs/lgi#352) crashes in core.record.fromarray, but somewm's build check reported this as "lgi not installed" and told users to reinstall a package that was already there. This splits the check so it tells a missing lgi apart from an installed-but-broken one, and vendors the lgi#352 patch in package.nix so the Nix flake builds on current nixpkgs. Fixes #588.

Test Plan

  • make and make test-unit (752 passing) are green.
  • Ran lgi-check.c standalone across all paths: healthy lgi passes; missing lgi shows the install message; a GLib-2.88-broken lgi shows the new "installed but unusable" message; SOMEWM_IGNORE_LGI=1 is honored in both failure cases.
  • Confirmed the vendored patch applies to lgi 0.9.2 and yields valid Lua (a full nix build was not run here — no nix daemon on this box).

Checklist

  • Lua libraries (lua/awful/, lua/gears/, lua/wibox/, lua/naughty/) are not modified — if a bug surfaces in Lua, the fix belongs in C
  • Tests pass (make test-unit && make test-integration)

GLib 2.88 changed enum-class introspection so GEnumClass.values is a
table rather than a record; an lgi without the upstream fix
(lgi-devs/lgi#352) crashes in core.record.fromarray when any namespace
loads. Vendor that patch in package.nix so the flake builds on current
nixpkgs, and split the build-time check so it reports "installed but
unusable" instead of telling users to reinstall lgi.
@JimmyCozza JimmyCozza mentioned this pull request May 24, 2026
3 tasks
@JimmyCozza JimmyCozza merged commit df51e45 into main May 26, 2026
3 checks passed
@JimmyCozza JimmyCozza deleted the fix/lgi-check-message branch May 26, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing LGI check

1 participant