Can't find Timeout.add_once?

I am running the latest version of Vala and GLib 2.74, but whenever I try to use GLib.Timeout.add_once (GLib.Timeout.add_once – glib-2.0) my compiler cannot find it:


The rest of GLib.Timeout works fine.

add_once was added to vala on 8 August 2022 with this commit: glib-2.0,gio-2.0,gobject-2.0: Update 2.74 symbols (72173734) · Commits · GNOME / vala · GitLab

The latest release of vala is 56.3 which was tagged 3 September 2022, but that commit is not in it. I guess you need to use the development version of vala or wait for the next vala release. I’m not handy enough with git to figure out if that commit should have been in 56.3 or why it isn’t.

On Arch Linux I have vala 56.3 and indeed the add_once is missing from /usr/share/vala-0.56/vapi/glib-2.0.vapi. Same on Debian Sid (package valac-0.56-vapi).

1 Like

thank you jakedane. I just ended up replacing my entire local /vapi directory with the one on the gitlab and that did the trick

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.