RE: RFC version issues



It sounds like gtk-perl compiles different stuff depending on what version
of the dependencies are available. This does sound very confusing. I think
that version x of gtk-perl (or anything) should have the same API and always
the same API. If people want GTK+ 2.2 instead of GTK+ 2.4 then they can use
an older version of gtk-perl.

Murray Cumming
www.murrayc.com
murrayc usa net

-----Original Message-----
From: gtk-perl-list-admin gnome org 
[mailto:gtk-perl-list-admin gnome org] On Behalf Of Ross McFarland
Sent: Freitag, 23. Januar 2004 05:12
To: Gtk-Perl-List
Subject: RFC version issues


there's a bunch of issues that revolve around the fact that 
the bindings are compiled against a particular version of 
gtk+ and only have the functions associated with that 
version. basically it comes down to the fact that you can't 
trust the information that comes out of check_version and 
get_version_info b/c their info comes form the dynamically 
linked libraries. 

here's the scenario:
      * system starts with gtk+ 2.0.6
      * you dl and install Gtk2 1.023 
      * you now have bindings for the things in gtk+ 2.0.6,
        check_version and get_version info will be correct 
and will tell
        you what's available to you)
      * up upgrade gtk+ to 2.4.2 when it comes out
      * now check_version and get_version_info tell you 
you've got gtk+
        2.4.2, but the bindings were compiled against 2.0.6 
so they only
        have the wrappers for stuff available in it.

this is problem because there's no way for an app to tell 
what it has available to it. the two possible solutions are:

1) modify check_version and get_version_info to return the 
compiled against stuff which would tell you what you have available.

don't like this b/c it changes the documented behavior of 
existing gtk functions.

2) add two new functions, for example check_bound_version and 
get_bound_version_info. these would return the versions Gtk2 
was compiled against and therefore what is available to the app.

optionally warning messages could be printed saying not to 
use check_version and get_version_info b/c they're almost 
useless. (they could be useful if you're trying to work 
around bugs in gtk+ so this probably isn't a good idea)

a separate issue is the case where bindings were compiled 
against a newer version then they are now being linked 
against. this is a big problem that could result in undefined 
symbols. i propose that a warning message be printed out when 
this situation is encountered. it is not necessarily fatal, 
but could be a source of many problems.

the implementation of #2 and the separate issue: 
http://www.neces.com/gtk2-perl/gtk-xs_versions.patch

an patch that can be applied, includes ^:
http://www.neces.com/gtk2-perl/versions.patch

a big question is what should the 2 new function be called to make it clear.

discuss away.
-rm

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org http://mail.gnome.org/mailman/listinfo/gtk-perl-list



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