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 780006 - allow plugin interface to inform IdeContext what build system to use
allow plugin interface to inform IdeContext what build system to use
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-13 22:21 UTC by Christian Hergert
Modified: 2017-03-14 01:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
buildsystem: add ide_build_system_get_id() vfunc (5.00 KB, patch)
2017-03-13 22:21 UTC, Christian Hergert
committed Details | Review
buildsystem: allow specifying a type hint to load build system (3.61 KB, patch)
2017-03-13 22:22 UTC, Christian Hergert
committed Details | Review
buildsystem: add plugin interface to discover build system (15.12 KB, patch)
2017-03-13 22:22 UTC, Christian Hergert
committed Details | Review
flatpak: discover build system using flatpak manifest (11.38 KB, patch)
2017-03-14 01:25 UTC, Christian Hergert
committed Details | Review

Description Christian Hergert 2017-03-13 22:21:38 UTC
We don't currently have a way to inform IdeContext what build system to use when loading. It just relies on build system priority and then asking the IdeBuildSystem implementation if it can successfully initialize.

We need a build system hint, and a plugin interface so that a plugin can inform what build system it think should be used.

For example, flatpak can use this to look at the "buildsystem" property and suggest the given build system.
Comment 1 Christian Hergert 2017-03-13 22:21:59 UTC
Created attachment 347884 [details] [review]
buildsystem: add ide_build_system_get_id() vfunc

This allows for specifying a small identifier for the build system type
such as "autotools" or "cmake" or "meson" or "cargo".

We can use this in future patches for matching up a build system with
a given load hint.
Comment 2 Christian Hergert 2017-03-13 22:22:02 UTC
Created attachment 347885 [details] [review]
buildsystem: allow specifying a type hint to load build system

If we have an idea of what build system should be used, we can provide that
during creation so that we sort the build systems in an order that prefers
the hint'd build system.
Comment 3 Christian Hergert 2017-03-13 22:22:06 UTC
Created attachment 347886 [details] [review]
buildsystem: add plugin interface to discover build system

This adds an IdeBuildSystemDiscovery interface so that we can try to
discover the preferred build system during project loading based on
external data, such as a json manifest from flatpak.
Comment 4 Christian Hergert 2017-03-14 00:47:21 UTC
This gets the plumbing landed, still need to finish the flatpak plugin for IdeBuildSystemDiscovery.

Attachment 347884 [details] pushed as 7a59c3a - buildsystem: add ide_build_system_get_id() vfunc
Attachment 347885 [details] pushed as 54af0d0 - buildsystem: allow specifying a type hint to load build system
Attachment 347886 [details] pushed as 43b1422 - buildsystem: add plugin interface to discover build system
Comment 5 Christian Hergert 2017-03-14 01:25:35 UTC
Created attachment 347897 [details] [review]
flatpak: discover build system using flatpak manifest

If we discover the build system from the manifest, we can provide a type
hint to the build system loader. This allows us to get the right build
system for flatpak (thus ensuring our configure opts are correct).
Comment 6 Christian Hergert 2017-03-14 01:25:54 UTC
This should do it.

Attachment 347897 [details] pushed as 32dd4e9 - flatpak: discover build system using flatpak manifest