GNOME Bugzilla – Bug 780628
autotools: Mark chained stage as completed (or not)
Last modified: 2017-03-29 18:41:21 UTC
I'm not sure why this can't be done at a higher level in ide_build_pipeline_try_chain() but maybe there's some situation I'm not considering.
Created attachment 348849 [details] [review] autotools: Mark chained stage as completed (or not) This commit ensures that when two make stages are chained, the chained stage gets marked as completed when the combined stage completes (and back to not completed if it's invalidated).
Review of attachment 348849 [details] [review]: This isn't really safe to do unless you unbind after the operation. A plugin could insert a stage in-between if it is enabled after pipeline setup.
Created attachment 348914 [details] [review] pipeline: Mark chained stage as completed (or not) This commit ensures that when two make stages are chained, the chained stage gets marked as completed when the combined stage completes (and back to not completed if it's invalidated).
Review of attachment 348914 [details] [review]: A couple quick fixes and then this LGTM ::: libide/buildsystem/ide-build-pipeline.c @@ +1109,3 @@ g_array_set_clear_func (self->errfmts, clear_error_format); + self->chained_bindings = g_ptr_array_new_with_free_func (g_object_unref); Instead of relying on "auto-unbinding" of the GBinding, instead use a custom destroy notify that does: g_binding_unbind (binding); g_object_unref (binding); @@ -1176,3 +1191,3 @@ - /* - * NOTE: We do not mark the chained stage as completed as that is left + chained_binding = g_object_bind_property (stage, "completed", entry->stage, "completed", 0); + g_ptr_array_add (self->chained_bindings, chained_binding); The return value from g_object_bind_property() is not owned, so you need to g_object_ref(chained_binding).
Pushed as commit dd207ab91e893193d463fc89ebc29ade2db6db1f