After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746057 - Master doesn't build with Vala 0.24
Master doesn't build with Vala 0.24
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: build
master
Other Linux
: High normal
: 0.10.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-11 23:04 UTC by Jim Nelson
Modified: 2015-03-12 01:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Call g_binding_unbind directly, since it isn't bound for Vala < 0.26 (2.13 KB, patch)
2015-03-12 01:05 UTC, Robert Schroll
committed Details | Review

Description Jim Nelson 2015-03-11 23:04:37 UTC
The latest master doesn't build with Vala 0.24 due to these errors:

/home/yorba/geary/src/client/components/main-toolbar.vala:195.9-195.35: error: The name `unbind' does not exist in the context of `GLib.Binding'
        guest_header_binding.unbind();
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/home/yorba/geary/src/client/composer/composer-box.vala:81.13-81.32: error: The name `unbind' does not exist in the context of `GLib.Binding?'
            title_binding.unbind();
            ^^^^^^^^^^^^^^^^^^^^

Since these are small errors, I think we should change them to work with Vala 0.24.  The unref() method is acceptable here, I believe (see bug #730967).  Or, extern g_binding_unbind() and call it directly.

The alternative is to require Vala 0.26, but that's not available out-of-the-box on Utopic, which we're tracking for this release.
Comment 1 Robert Schroll 2015-03-12 01:05:23 UTC
Created attachment 299142 [details] [review]
Call g_binding_unbind directly, since it isn't bound for Vala < 0.26

I went with the extern route, since that makes it more obvious that this 
is a workaround.  I stuck the function in GtkUtil, for lack of a better 
place.  This seems to compile under both Vala 0.24 and 0.26, but I've 
never used extern before, so please check.
Comment 2 Jim Nelson 2015-03-12 01:25:07 UTC
Review of attachment 299142 [details] [review]:

This looks fine.  In fact, you went the extra mile and made it "look" like Vala w/ the CCode attribute.  You can also just do this with extern:

extern void g_bind_unbind(Binding binding);

and then call the function directly:

g_bind_unbind(title_binding);

It's six-of-one, so your patch is fine.
Comment 3 Robert Schroll 2015-03-12 01:34:01 UTC
I tried to do it like that, but it didn't work with it in the GtkUtil 
namespace.  I figured putting it in the namespace would help the sorry 
soul who stumbles on this next figure out what we were doing.

Attachment 299142 [details] pushed as bfaeee6 - Call g_binding_unbind directly, since it isn't bound for Vala < 0.26