Skip to content

v2.0.0-beta.5

Pre-release
Pre-release

Choose a tag to compare

@eugeniodepalo eugeniodepalo released this 04 Sep 21:09
· 23 commits to main since this release

GTKX 2.0 beta 5 fixes the remaining issues found while building a real application on beta 4: async methods whose GIR metadata names a finish function on another class, generated-store leftovers, headless runtime cleanup, development-server restarts, and a set of documentation and message corrections.

GTKX 2.0 beta 5 is a prerelease. The final GTKX 2.0 release is scheduled for December 1, 2026, after the migration and hardening period.

Code Generation and Reference

  • Async methods whose glib:finish-func names a method of another class are now paired with a finish method of their own class: the <name>_finish sibling when one exists, otherwise the class's single generic finish method. Pk.PackageSack.getDetailsAsync, getUpdateDetailAsync and resolveAsync therefore return Promise<boolean> and complete through Pk.PackageSack.mergeGenericFinish; following the previous generated note (Pk.Client.genericFinish) crashed the process. A method stays callback-based only when no finish method of its class can be paired, and its note now states which finish function the GIR declares, that it belongs to another class, and that it must only be called on the instance that owns the result.
  • Reference pages now render the generated callable notes (callback-only finish ownership and NUL-terminated byte parameters), which previously appeared only in the typings.
  • Generated typings strip the same C memory-management instructions as the reference pages (free, unref, strfreev and caller-ownership prose in descriptions, @param and @returns text), so editor hover no longer shows C cleanup steps; the stripping now lives in one shared module.
  • GObject.Object.newv called with a non-array argument now names X.new(...) only when the class declares that factory, otherwise explains that newv takes an array of GObject.Parameter, and an unbound call throws a clear TypeError instead of a property-read error.
  • Bridge declarations for narrowed inherited methods are emitted only for callables the class exposes, and narrowings that stay assignable declare the natural signature directly. Genuinely incompatible narrowings keep the non-exported tombstone overload, which TypeScript leaves no other way to express.

Release Process

  • Packages are published in dependency order, so a package that pins a sibling never reaches the registry before its target.

Generated Stores

  • Every codegen run now reclaims the root-level .gi-* and .jsx-* directories that earlier layouts wrote once no retained pair reaches them, so a project migrated from beta 2 or beta 3 no longer keeps dead copies of each store. Only complete pair generations receive the three-generation allowance.
  • Directories whose writer is another live process are protected on every reclamation path, including --force publication, which previously removed a live writer's incomplete pair.
  • The lock timeout error reports how long it waited and names GTKX_CODEGEN_LOCK_TIMEOUT_MS; a flock failure that is not a timeout gets its own message. The configuration guide describes the retention rule and the post-run store contents accurately.

Headless Development and Testing

  • The stale-runtime reaper now accepts a user-owned gtkx-xdg-* directory that holds only a template-exact session.conf when no process references it, so a run that died before writing sway.conf no longer leaves a directory nothing reclaims. The startup reap in gtkx dev and the Vitest plugin prints one [gtkx] line naming what it removed, and nothing when there was nothing to remove.
  • A compositor crash no longer removes the runtime directory under a live worker. The watch shell kills the remnants of the compositor's process group, keeps the directory and the session bus until the worker itself exits, and the crash message names where compositor.stderr.log is kept meanwhile.

Development Server

  • A restart whose translation extraction rewrites a PO file no longer triggers a second restart. The runner remembers the catalogs its own extraction wrote and ignores the watcher events they produce, so a healthy save costs one restart and no fetchModule transport error. External catalog edits still restart the session exactly once, and extraction errors still keep it running.

Project Creation, Deployment, and Documentation

  • gtkx dev --config reload messages name the file that actually changed (gtkx.config.ts changed; regenerating bindings... when the base of a selected configuration is saved, a c12 layer, or a dependency that appeared), and the tutorial and configuration guide document that the selected configuration's whole import and extends graph is watched.
  • create-gtkx no longer lists node_modules/.gtkx/env.d.ts among the scaffold files it replaces, refuses a non-empty destination without --overwrite before printing a replacement list, leaves no empty node_modules/.gtkx/ behind with --skip-install, and rejects unknown flags with its own message pointing at --help.
  • The fatal AppStream unknown-tag error no longer quotes appstreamcli's success summary; it states that GTKX treats the rule as fatal for every target and names the unsupported element. The extraFiles and node deployment option aliases carry real descriptions.
  • The testing guide documents hard-kill teardown of Vitest workers, the startup reap, and gtkx cleanup with --dry-run; the deploying guide records the extraFiles collision warning.

(#619)

Full changelog: v2.0.0-beta.4...v2.0.0-beta.5