v2.0.0-beta.5
Pre-release
Pre-release
·
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-funcnames a method of another class are now paired with a finish method of their own class: the<name>_finishsibling when one exists, otherwise the class's single generic finish method.Pk.PackageSack.getDetailsAsync,getUpdateDetailAsyncandresolveAsynctherefore returnPromise<boolean>and complete throughPk.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,strfreevand caller-ownership prose in descriptions,@paramand@returnstext), so editor hover no longer shows C cleanup steps; the stripping now lives in one shared module. GObject.Object.newvcalled with a non-array argument now namesX.new(...)only when the class declares that factory, otherwise explains thatnewvtakes an array ofGObject.Parameter, and an unbound call throws a clearTypeErrorinstead 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
--forcepublication, 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; aflockfailure 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-exactsession.confwhen no process references it, so a run that died before writingsway.confno longer leaves a directory nothing reclaims. The startup reap ingtkx devand 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.logis 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
fetchModuletransport error. External catalog edits still restart the session exactly once, and extraction errors still keep it running.
Project Creation, Deployment, and Documentation
gtkx dev --configreload 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 andextendsgraph is watched.create-gtkxno longer listsnode_modules/.gtkx/env.d.tsamong the scaffold files it replaces, refuses a non-empty destination without--overwritebefore printing a replacement list, leaves no emptynode_modules/.gtkx/behind with--skip-install, and rejects unknown flags with its own message pointing at--help.- The fatal AppStream
unknown-tagerror no longer quotes appstreamcli's success summary; it states that GTKX treats the rule as fatal for every target and names the unsupported element. TheextraFilesandnodedeployment option aliases carry real descriptions. - The testing guide documents hard-kill teardown of Vitest workers, the startup reap, and
gtkx cleanupwith--dry-run; the deploying guide records theextraFilescollision warning.
(#619)
Full changelog: v2.0.0-beta.4...v2.0.0-beta.5