[gnome-builder] pipeline: build-commands need to be re-run as part of build



commit 84e0a30e33684d33cc8615ceb46bc80f81fff1c8
Author: Christian Hergert <chergert redhat com>
Date:   Sun Apr 8 19:57:44 2018 -0700

    pipeline: build-commands need to be re-run as part of build

 src/libide/buildsystem/ide-build-pipeline.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index 4de288d3a..b890cf1b4 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -948,6 +948,24 @@ ide_build_pipeline_extension_removed (PeasExtensionSet *set,
   IDE_EXIT;
 }
 
+static void
+build_command_query_cb (IdeBuildStage    *stage,
+                        IdeBuildPipeline *pipeline,
+                        GCancellable     *cancellable,
+                        gpointer          user_data)
+{
+  IDE_ENTRY;
+
+  g_assert (IDE_IS_BUILD_STAGE_LAUNCHER (stage));
+  g_assert (IDE_IS_BUILD_PIPELINE (pipeline));
+  g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+  g_assert (user_data == NULL);
+
+  ide_build_stage_set_completed (stage, FALSE);
+
+  IDE_EXIT;
+}
+
 static void
 register_build_commands_stage (IdeBuildPipeline *self,
                                IdeContext       *context)
@@ -993,6 +1011,8 @@ register_build_commands_stage (IdeBuildPipeline *self,
                             "launcher", launcher,
                             NULL);
 
+      g_signal_connect (stage, "query", G_CALLBACK (build_command_query_cb), NULL);
+
       ide_build_pipeline_connect (self,
                                   IDE_BUILD_PHASE_BUILD | IDE_BUILD_PHASE_AFTER,
                                   i,


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