GNOME Bugzilla – Bug 742380
Make us of pkg.require to list dependencies
Last modified: 2015-01-05 14:30:15 UTC
We are now using the Gjs package.js functionality. So we can use the pkg.require method, more here: https://wiki.gnome.org/Projects/Gjs/Package We can list the gir repositories we depend on and have Maps exit if they are not available. We can specify an API version to depend on. What we cannot do is specify a version of the package we depend on. So we still have no way to say "we need version 3.15.3 of GeocodeGlib", unfortunately. How should we deal with that? Just expect people to use jhbuild and get it right?
Created attachment 293819 [details] [review] main: Add required GIR dependencies Use pkg.require to mark a set of dependencies on GI and standard JS modules. The keys are repository names and the values are API versions. This will not specify the required _version_ of the package we depend on. But it will make sure that the required package is installed. If a check fails a message will be printed and the application will quit.
Review of attachment 293819 [details] [review]: Nice. Just add Goa, GtkClutter and GWeather.
Created attachment 293820 [details] [review] main: Move pkg.init* calls to the top of the file This is done in that way in gnome-weather and gtk-js-app so let's use the same style. --- Just realized this :)