[gnome-builder] foundry: clear cached build targets when invaliding pipeline



commit 7de9c970583500f08d10c83647e5904c8457251b
Author: Christian Hergert <chergert redhat com>
Date:   Fri Feb 22 22:26:25 2019 -0800

    foundry: clear cached build targets when invaliding pipeline

 src/libide/foundry/ide-build-manager.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/libide/foundry/ide-build-manager.c b/src/libide/foundry/ide-build-manager.c
index 95db53922..74096307e 100644
--- a/src/libide/foundry/ide-build-manager.c
+++ b/src/libide/foundry/ide-build-manager.c
@@ -37,6 +37,7 @@
 #include "ide-device.h"
 #include "ide-foundry-compat.h"
 #include "ide-pipeline.h"
+#include "ide-run-manager.h"
 #include "ide-runtime-manager.h"
 #include "ide-runtime-private.h"
 #include "ide-runtime.h"
@@ -548,6 +549,7 @@ ide_build_manager_invalidate_pipeline (IdeBuildManager *self)
   g_autoptr(IdeTask) task = NULL;
   IdeConfigManager *config_manager;
   IdeDeviceManager *device_manager;
+  IdeRunManager *run_manager;
   IdeConfig *config;
   IdeContext *context;
   IdeDevice *device;
@@ -573,6 +575,12 @@ ide_build_manager_invalidate_pipeline (IdeBuildManager *self)
       g_signal_emit (self, signals [BUILD_FAILED], 0, self->pipeline);
     }
 
+  /*
+   * Clear any cached build targets from the run manager.
+   */
+  run_manager = ide_run_manager_from_context (context);
+  ide_run_manager_set_build_target (run_manager, NULL);
+
   /*
    * Cancel and clear our previous pipeline and associated components
    * as they are not invalide.


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