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 779251 - build: Boxes won't build against Valac --version > 0.35.5
build: Boxes won't build against Valac --version > 0.35.5
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
: 779267 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-02-26 13:20 UTC by Felipe Borges
Modified: 2017-03-27 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
icon-view: GtkListStore.remove() requires ref arg (1.06 KB, patch)
2017-02-26 13:21 UTC, Felipe Borges
none Details | Review
icon-view: GtkListStore.remove() requires ref arg (1.15 KB, patch)
2017-02-26 13:22 UTC, Felipe Borges
committed Details | Review
icon-view: GtkListStore.remove() requires 'ref' arg (1.06 KB, patch)
2017-02-26 13:23 UTC, Felipe Borges
none Details | Review

Description Felipe Borges 2017-02-26 13:20:52 UTC
GNOME 3.24, and consequently Boxes 3.24, will be shipped with valac 0.36. In doing so, Boxes needs to build with it.

Nowadays, building against Vala 0.35.5.19-361fc (HEAD master today), I obtain the following build failure error:

icon-view.vala:221.23-221.26: error: Argument 1: Cannot pass value to reference or output parameter
        store.remove (iter);
                      ^^^^
Comment 1 Felipe Borges 2017-02-26 13:21:56 UTC
Created attachment 346751 [details] [review]
icon-view: GtkListStore.remove() requires ref arg

Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e
the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove
as 'ref'.

This way, we now increase the internal reference counting of the
Gtk.TreeIter while passing it to store.remove ().

This patch breaks the building with valac <= 0.35.5
Comment 2 Felipe Borges 2017-02-26 13:22:42 UTC
Created attachment 346752 [details] [review]
icon-view: GtkListStore.remove() requires ref arg

Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e
the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove
as 'ref'.

This way, we now increase the internal reference counting of the
Gtk.TreeIter while passing it to store.remove ().

This patch adds an (undesired) #if VALA_0_36 conditional check in
order to keep Boxes building against older versions of Vala.
Comment 3 Felipe Borges 2017-02-26 13:23:30 UTC
Created attachment 346753 [details] [review]
icon-view: GtkListStore.remove() requires 'ref' arg

Since commit https://git.gnome.org/browse/vala/commit/?id=ddca99e
the vapi for gtk+-X.0 marks the "iter" param of GtkListore.remove
as 'ref'.

This way, we now increase the internal reference counting of the
Gtk.TreeIter while passing it to store.remove ().

This patch breaks the building with valac <= 0.35.5
Comment 4 Felipe Borges 2017-02-26 13:25:51 UTC
I propose two solutions. The first patch is backwards compatible in a ugly way.

btw, I though git-bz wouldn't overwrite the patches since their commit messages differ. Apparently just the first line is compared, heh. :p
Comment 5 Felipe Borges 2017-02-26 22:03:16 UTC
*** Bug 779267 has been marked as a duplicate of this bug. ***
Comment 6 Rico Tzschichholz 2017-02-26 22:32:04 UTC
Comment on attachment 346752 [details] [review]
icon-view: GtkListStore.remove() requires ref arg

Looks good.
Comment 7 Felipe Borges 2017-02-26 23:22:07 UTC
Thank you Rico for your prompt response and your amazing work with Vala.

Attachment 346752 [details] pushed as 8173193 - icon-view: GtkListStore.remove() requires ref arg
Comment 8 Jeremy Bicha 2017-03-21 02:46:42 UTC
Feel free to drop the #if VALA_0_36 check now that you've branched 3.24.

Thanks!