[gnome-builder] meson: attempt to setup pipeline even upon failure
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] meson: attempt to setup pipeline even upon failure
- Date: Mon, 1 Mar 2021 00:44:17 +0000 (UTC)
commit f0772d787835651580c53f796b7f8d51924abb35
Author: Christian Hergert <chergert redhat com>
Date: Sun Feb 28 16:42:34 2021 -0800
meson: attempt to setup pipeline even upon failure
By setting up the pipeline we increase the chances that we can provide
the user with something valuable. It is also more robust to them actually
installing the meson/ninja bits behind the scenes and allow us to continue
working.
Fixes #1407
src/plugins/meson/gbp-meson-pipeline-addin.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-pipeline-addin.c b/src/plugins/meson/gbp-meson-pipeline-addin.c
index d2786ab2a..42cfaa1ab 100644
--- a/src/plugins/meson/gbp-meson-pipeline-addin.c
+++ b/src/plugins/meson/gbp-meson-pipeline-addin.c
@@ -147,6 +147,14 @@ gbp_meson_pipeline_addin_load (IdePipelineAddin *addin,
g_assert (IDE_IS_RUNTIME (runtime));
g_assert (srcdir != NULL);
+ if (NULL == (meson = ide_config_getenv (config, "MESON")))
+ meson = "meson";
+
+ /* Warn about not finding Meson, but continue setting up */
+ if (!ide_runtime_contains_program_in_path (runtime, meson, NULL))
+ ide_context_warning (context,
+ _("A Meson-based project is loaded but meson could not be found."));
+
/* Requires NULL check so we can use g_strv_contains() elsewhere */
for (guint i = 0; ninja_names[i]; i++)
{
@@ -160,11 +168,12 @@ gbp_meson_pipeline_addin_load (IdePipelineAddin *addin,
if (ninja == NULL)
ninja = ide_config_getenv (config, "NINJA");
+ /* Warn about not finding ninja, but continue setting up */
if (ninja == NULL)
{
ide_context_warning (context,
_("A Meson-based project is loaded but Ninja could not be found."));
- IDE_EXIT;
+ ninja = "ninja";
}
/* Create all our launchers up front */
@@ -178,13 +187,6 @@ gbp_meson_pipeline_addin_load (IdePipelineAddin *addin,
config_opts = ide_config_get_config_opts (config);
parallel = ide_config_get_parallelism (config);
- if (NULL == (meson = ide_config_getenv (config, "MESON")))
- meson = "meson";
-
- if (!ide_runtime_contains_program_in_path (runtime, meson, NULL))
- ide_context_warning (context,
- _("A Meson-based project is loaded but meson could not be found."));
-
/* Create the toolchain file if required */
if (GBP_IS_MESON_TOOLCHAIN (toolchain))
crossbuild_file = g_strdup (gbp_meson_toolchain_get_file_path (GBP_MESON_TOOLCHAIN (toolchain)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]