On Mon, 2015-01-19 at 17:01 -0500, Colin Walters wrote:
On Mon, Jan 19, 2015, at 03:53 PM, Philip Withnall wrote:I’ve attached a really quick patch which fixes this for me, but it probably misses some code paths, and probably doesn’t match with Colin’s original intention for dependencies[1]. I don’t really know.I think it's better to have this be non-transitive, and offer an API to compute the full transitive set. If it was transitive at compilation time, it would require a rebuild of all consumers if a library dropped an unnecessary dependency, for example. It wouldn't allow accurately distinguishing what libraries a given library *really* depended on directly.
Totally agreed, so the correct fix here is to: • document the typelib dependencies field as being non-transitive, • document the GIR <include> lists as being non-transitive, • deprecate g_irepository_get_dependencies(), • add a new g_irepository_get_all_dependencies() to load the transitive dependency list, and • add a new g_irepository_get_immediate_dependencies() to get the non-transitive dependency list. g_irepository_get_dependencies() is unsuitable for recursively calling g_irepository_require() because it has no GError parameter, unfortunately. If that sounds OK to you I’ll file a bug and some patches tomorrow. Philip
Attachment:
signature.asc
Description: This is a digitally signed message part