GNOME Bugzilla – Bug 780006
allow plugin interface to inform IdeContext what build system to use
Last modified: 2017-03-14 01:25:57 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.
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.
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.
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.
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
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).
This should do it. Attachment 347897 [details] pushed as 32dd4e9 - flatpak: discover build system using flatpak manifest