From 80a37bcf53592cb7f4da823c1f8b2146142d4504 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Sat, 27 Apr 2024 15:14:16 +0200 Subject: [PATCH] js: Update for Gio/GioUnix split GLib 2.79.2 split out the platform specific Gio APIs into a separate GIRs, while still keeping a copy in the Gio GIR. gjs then added warnings about the APIs being moved. This bumps the Gio(Unix) version requirement to 2.79.2 and switches to using the new GioUnix GIR. See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3892 See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/918 Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7539 Part-of: --- .gitlab-ci.yml | 2 +- js/misc/dependencies.js | 1 + js/misc/loginManager.js | 3 ++- js/ui/components/networkAgent.js | 5 +++-- meson.build | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ffd6081fa..d89ebb101 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ default: - 'api_failure' variables: - MUTTER_CI_IMAGE: registry.gitlab.gnome.org/gnome/mutter/fedora/40:x86_64-2024-02-23.0 + MUTTER_CI_IMAGE: registry.gitlab.gnome.org/gnome/mutter/fedora/40:x86_64-2024-04-29.0 FDO_UPSTREAM_REPO: GNOME/gnome-shell BUNDLE: "extensions-git.flatpak" LINT_LOG: "eslint-report.xml" diff --git a/js/misc/dependencies.js b/js/misc/dependencies.js index d4837af04..f8f98d487 100644 --- a/js/misc/dependencies.js +++ b/js/misc/dependencies.js @@ -12,6 +12,7 @@ import 'gi://Gdk?version=4.0'; import 'gi://Gdm?version=1.0'; import 'gi://Geoclue?version=2.0'; import 'gi://Gio?version=2.0'; +import 'gi://GioUnix?version=2.0'; import 'gi://GDesktopEnums?version=3.0'; import 'gi://GdkPixbuf?version=2.0'; import 'gi://GnomeBG?version=4.0'; diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js index fe3719244..1515fc9e3 100644 --- a/js/misc/loginManager.js +++ b/js/misc/loginManager.js @@ -2,6 +2,7 @@ import GLib from 'gi://GLib'; import Gio from 'gi://Gio'; +import GioUnix from 'gi://GioUnix'; import * as Signals from './signals.js'; import {loadInterfaceXML} from './fileUtils.js'; @@ -206,7 +207,7 @@ class LoginManagerSystemd extends Signals.EventEmitter { await this._proxy.call_with_unix_fd_list('Inhibit', inVariant, 0, -1, null, cancellable); const [fd] = fdList.steal_fds(); - return new Gio.UnixInputStream({fd}); + return new GioUnix.InputStream({fd}); } _prepareForSleep(proxy, sender, [aboutToSuspend]) { diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index cb4a7c9bd..f6d5e1a3f 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -2,6 +2,7 @@ import Clutter from 'gi://Clutter'; import Gio from 'gi://Gio'; +import GioUnix from 'gi://GioUnix'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import NM from 'gi://NM'; @@ -469,8 +470,8 @@ class VPNRequestHandler extends Signals.EventEmitter { }); this._childPid = pid; - this._stdin = new Gio.UnixOutputStream({fd: stdin, close_fd: true}); - this._stdout = new Gio.UnixInputStream({fd: stdout, close_fd: true}); + this._stdin = new GioUnix.OutputStream({fd: stdin, close_fd: true}); + this._stdout = new GioUnix.InputStream({fd: stdout, close_fd: true}); GLib.close(stderr); this._dataStdout = new Gio.DataInputStream({base_stream: this._stdout}); diff --git a/meson.build b/meson.build index e71d65559..3c28fbfc3 100644 --- a/meson.build +++ b/meson.build @@ -22,7 +22,7 @@ libmutter_test_pc = 'libmutter-test-' + mutter_api_version ecal_req = '>= 3.33.1' eds_req = '>= 3.33.1' gcr_req = '>= 3.90.0' -gio_req = '>= 2.56.0' +gio_req = '>= 2.79.2' gi_req = '>= 1.49.1' gjs_req = '>= 1.73.1' gtk_req = '>= 4.0'