Re: version checking... take II



* Ross McFarland <rwmcfa1 neces com>:

2) modify get_version_info and check_version to work with the bound version
rather than the linked version and add two functions: get_linked_version_info
and check_linked_version which provide the original behavior.
 
options? you've got a day or two to voice them before we just implement our
preferred one.

I know I might sound unpopular, but the more I look at this matter, the
more I'm inclined towards an implementation of the second option.

* Rationale:

When checking the GTK version at runtime in a C program, with
check_version for instance, we are checking a dynamic library, with a
version table defined at compile time.  I know that check_version and
get_version_info are used in order to retrieve data from the library we
are currently loading, and not from the library we build a program
against; but, in perl, we already have a similar mechanism: the $VERSION
variable.  As a developer, if I ever need to check that I'm using the
right version of gtk2-perl, I shall check the $VERSION Gtk2.pm; on the
other hand, since I effectively know that gtk2-perl is compiled against
a specific version of GTK 2.x, if I ever need to chek GTK version, I
will also know that it's the library that gtk2-perl that was compiled
against, and not the library present in my box; I know that, and if
anyone wants to support different versions of GTK (thus willingly
looking for troubles), they'll either will know this by the
documentation, or the hard way, by getting the perl compiler to slap
them in the face when trying to use an usupported feature.

It's up to the developer know that something is doable with a specific
version of gtk2-perl AND of GTK 2.x; and it's up to the package
maintainer insure that the dependancy chain of gtk2-perl does remain
correct.  gtk2-perl's package maintainers may choose the use an older
version of gtk2-perl (with patches in case of bugs or security related
issues) that correctly matches the current GTK version; a user who wish
to use the very latest GTK package (directly as a developer, or
indirectly as a user of a program that requires the Ultra-Edge GTK
Version), will have to download it anyway, so I do not see the issue.
We (except Gentoo users) are living in a world of packaged binary
libraries and software; let the packagers (and the users that have
choosen such a life) handle it.

So, I advocate for option 2, and not 1 which is, in my way of seeing
this matter, outsmarting both developers and package maintainers.

Kind regards,
 Emmanuele (sorry for bad english, but it's 6 AM in the moring, and I've
 yet to go to sleep).

-- 
Emmanuele Bassi (Zefram)                 [ http://www.emmanuelebassi.net ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]