GNOME Bugzilla – Bug 780674
simple: Add simple buildsystem plugin
Last modified: 2017-03-30 00:54:25 UTC
These patches work as intended but one unfortunate side effect is users might choose the manifest as the project file rather than configure.ac or meson.build without knowing that the manifest is only the project file for the simple build system. So we probably want to implement something that prevents such behavior.
Created attachment 348919 [details] [review] configuration: Move build commands into parent class Having the build-commands and post-install commands in IdeConfiguration rather than GbpFlatpakConfiguration will make it possible for plugins to access them, which will be useful to implement flatpak's "simple" buildsystem as a plugin.
Created attachment 348920 [details] [review] simple: Add simple buildsystem plugin This commit adds a plugin to support flatpak's "simple" buildsystem, which just runs the shell commands specified in the manifest's "build-commands" field.
Review of attachment 348919 [details] [review]: LGTM
Review of attachment 348920 [details] [review]: Let's not do this. Instead change GbpFlatpakBuildSystemDiscovery to return "directory" for the build system and instead register the pre/post commands inside of ide-build-pipeline.c during pipeline setup.
Created attachment 348957 [details] [review] flatpak: Add support for "simple" buildsystem This commit adds support for flatpak's "simple" buildsystem, which just runs the build commands in the manifest. The commands are loaded in the IdeBuildPipeline initalization so they are available for any buildsystem (and could conceivably be used with a non-flatpak config). Then the "directory" build system is used since nothing more needs to be done beyond running those commands.
Review of attachment 348957 [details] [review]: I know we weren't doing this before, but I'd like to clean it up as part of this to add a build stage for each subcommand. ::: libide/buildsystem/ide-build-pipeline.c @@ -774,0 +774,26 @@ +static void +register_build_commands_stage (IdeBuildPipeline *self, + IdeContext *context) ... 23 more ... I don't feel comfortable joining these into a single launcher and expecting bash to handle it correctly. Just add a new launcher for each of them and increment the priority by 1 after each connect(). @@ -774,0 +774,69 @@ +static void +register_build_commands_stage (IdeBuildPipeline *self, + IdeContext *context) ... 66 more ... Same here
Fixed and pushed as commit 2056810b1 and commit 5c63571dc