[gnome-builder/wip/gtk4-port] plugins/meson: remove use of ide_runtime_create_launcher()



commit 2cf066d9954b6df98f8214ff2039ceaa33f633ae
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jun 28 12:07:36 2022 -0700

    plugins/meson: remove use of ide_runtime_create_launcher()
    
    We probably want to move this away from subprocess launcher too, but this
    is a quick and easy first step to stop using the runtime create_launcher().

 src/plugins/meson/gbp-meson-build-target-provider.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-build-target-provider.c 
b/src/plugins/meson/gbp-meson-build-target-provider.c
index a78e050b3..f81c626da 100644
--- a/src/plugins/meson/gbp-meson-build-target-provider.c
+++ b/src/plugins/meson/gbp-meson-build-target-provider.c
@@ -55,7 +55,7 @@ create_launcher (IdeContext  *context,
       return NULL;
     }
 
-  if ((ret = ide_runtime_create_launcher (runtime, error)))
+  if ((ret = ide_pipeline_create_launcher (pipeline, error)))
     {
       ide_subprocess_launcher_set_flags (ret, G_SUBPROCESS_FLAGS_STDOUT_PIPE | 
G_SUBPROCESS_FLAGS_STDERR_SILENCE);
       ide_subprocess_launcher_set_cwd (ret, ide_pipeline_get_builddir (pipeline));
@@ -314,19 +314,17 @@ gbp_meson_build_target_provider_communicate_cb (GObject      *object,
       return;
     }
 
-  launcher = create_launcher (context, &error);
+  context = ide_object_get_context (IDE_OBJECT (self));
+  build_manager = ide_build_manager_from_context (context);
+  pipeline = ide_build_manager_get_pipeline (build_manager);
+  cancellable = ide_task_get_cancellable (task);
 
-  if (launcher == NULL)
+  if (!(launcher = ide_pipeline_create_launcher (pipeline, &error)))
     {
       ide_task_return_error (task, g_steal_pointer (&error));
       return;
     }
 
-  context = ide_object_get_context (IDE_OBJECT (self));
-  build_manager = ide_build_manager_from_context (context);
-  pipeline = ide_build_manager_get_pipeline (build_manager);
-  cancellable = ide_task_get_cancellable (task);
-
   ide_subprocess_launcher_push_argv (launcher, "meson");
   ide_subprocess_launcher_push_argv (launcher, "introspect");
   ide_subprocess_launcher_push_argv (launcher, "--installed");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]