After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780674 - simple: Add simple buildsystem plugin
simple: Add simple buildsystem plugin
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-29 06:51 UTC by Matthew Leeds
Modified: 2017-03-30 00:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
configuration: Move build commands into parent class (38.46 KB, patch)
2017-03-29 06:51 UTC, Matthew Leeds
accepted-commit_now Details | Review
simple: Add simple buildsystem plugin (9.28 KB, patch)
2017-03-29 06:51 UTC, Matthew Leeds
needs-work Details | Review
flatpak: Add support for "simple" buildsystem (10.51 KB, patch)
2017-03-29 21:11 UTC, Matthew Leeds
needs-work Details | Review

Description Matthew Leeds 2017-03-29 06:51:00 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.
Comment 1 Matthew Leeds 2017-03-29 06:51:04 UTC
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.
Comment 2 Matthew Leeds 2017-03-29 06:51:08 UTC
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.
Comment 3 Christian Hergert 2017-03-29 17:29:41 UTC
Review of attachment 348919 [details] [review]:

LGTM
Comment 4 Christian Hergert 2017-03-29 17:30:54 UTC
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.
Comment 5 Matthew Leeds 2017-03-29 21:11:50 UTC
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.
Comment 6 Christian Hergert 2017-03-29 22:29:37 UTC
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
Comment 7 Matthew Leeds 2017-03-30 00:54:25 UTC
Fixed and pushed as commit 2056810b1 and commit 5c63571dc