[Geany-devel] geany-plugins depends on GIO

Frank Lanitz frank at xxxxx
Wed Nov 17 08:25:10 UTC 2010

Am 17.11.2010 00:22, schrieb Colomban Wendling:
> Le 16/11/2010 23:32, Lex Trotman a écrit :
>> On 17 November 2010 03:11, Frank Lanitz <frank at frank.uvena.de> wrote:
>>> On Tue, 16 Nov 2010 15:13:03 +0100
>>> Colomban Wendling <lists.ban at herbesfolles.org> wrote:
>>>> Le 16/11/2010 09:23, Frank Lanitz a écrit :
>>>>> Well, agreed. In most cases it should work fine with compiled in
>>>>> version number as most cases the API/ABI is changing with some
>>>>> major release. But of course this will go into trouble with minor
>>>>> releases as we had them with 0.19.1 or if anybody is remembering
>>>>> the 10.x ones :)
>>>>> Well, however. I think a simple function which returns the version
>>>>> string into plugin API would be enought or am I wrong? something
>>>>> that is just doing a return GEANY_VERSION;
>>>> I think it is better to return major, minor and micro version (or
>>>> something that fits the versionning scheme) as plain integers.
>>>> The advantage is that it becomes easy to use this version for any
>>>> check, where a string is quite tedious to use.
>>>>   geany_get_version(gint *major, gint *minor, gint *micro)
>>>> for example, or 3 variables, not sure.
>>> Well, even it looks a bit dirty in my eyes (maybe we can put this into a
>>> struct) it would solve users from use the parsing over and over again
>>> as I did inside updatechecker with
>>> static void parse_version_string(const gchar *ver, gint *major, gint
>>> *minor, gint *micro, gchar **extra)
>>> So I'm pro ;)
>> Just a question, shouldn't plugins be checking the ABI version was
>> what they conpiled with not the Geany version?
> I think this is not the question: Updatechecker wants to know the Geany
> version to check whether there is a newer one, it's not a plugin
> development need, but a goal.

Yes, I'd say this is right.

> Of course, to check a functionality at runtime, a plugin should use the
> API version (and then getting the Geany version is quite specific).

> BTW since you speak of this, I think API version should be made more
> visible. The API version in which each function appeared should appear
> in the doc rather than the Geany version it appeared in. This would make
> easier for plugin developers to know for which version check.

Well, I think its maybe better to have printed both, even this is
causing a bunch of overhead.

> Also, perhaps a compile-time check would be interesting, it would allow
> things like "if Geany version is too old for this, it's not fatal, we
> will do without" -- stop me if it already exists.

This is not existing in a general view. Also I'm not 100% sure where
this would make sense as you should always you up to date API. Maybe you
can bring a litle light into darkness with an example.


More information about the Devel mailing list