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 721429 - Non-working attempt to fix gkr build
Non-working attempt to fix gkr build
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2014-01-03 20:35 UTC by Colin Walters
Modified: 2014-01-08 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Non-working attempt to fix gkr build (2.06 KB, patch)
2014-01-03 20:35 UTC, Colin Walters
none Details | Review

Description Colin Walters 2014-01-03 20:35:01 UTC
Looks like
https://git.gnome.org/browse/libsecret/commit/?id=dd6fcf87bb1fd605e4350749dacfed52938e8bb0
may have broken the build here.  I'm not sure how (if it's possible)
to convince Vala to invoke the right API.
Comment 1 Colin Walters 2014-01-03 20:35:03 UTC
Created attachment 265250 [details] [review]
Non-working attempt to fix gkr build
Comment 2 Evan Nemerson 2014-01-03 21:30:28 UTC
The problem here is that the Secret.Service type moved from SecretUnstable-0 to Secret-1, but some of the instance methods (did not).  In Vala (and G-I) there is no concept of extension methods, so they are converted from methods to static methods (functions in G-I terminology).  Since they are no longer instance methods from the Vala/G-I point of view Vala doesn't expect the finish function to take an instance, but secret_service_read_alias_dbus_path_finish does because it really is an instance method, G-I and Vala just have no way to represent that.

All the solutions I see are pretty obvious, but enumerated here for completeness:

 * Switch to the synchronous method in Seahorse and just avoid the problem.
 * Make sure the methods are in the same place as the type, either by reverting the change or moving the relevant functions into Secret-1.
 * Add support for extension methods in Vala, and probably G-I.

It's tempting to just think we could change how Vala works to allow you to do something like service_read_alias_dbus_path.end(service, res), but that would break the yield keyword (string foo = yield service_read_alias_dbus_path (service, alias, null)), and it would also require us to start exposing the finish function signatures in Vala, which doesn't seem worth it for a corner case like this.
Comment 3 Stef Walter 2014-01-04 10:19:40 UTC
Sigh. I guess I'll just remove the unstable vapi, and leave people to their own devices. I was trying to be too helpful and organized :)
Comment 4 Colin Walters 2014-01-04 12:21:33 UTC
(In reply to comment #3)
> Sigh. I guess I'll just remove the unstable vapi, and leave people to their own
> devices. I was trying to be too helpful and organized :)

It is a good idea...just one not well supported by tooling =/
Comment 6 Evan Nemerson 2014-01-04 19:28:38 UTC
Instead of removing it altogether, you could just use a metadata file to hide the asynchronous versions.  AFAICT these types of functions are the only thing left in SecretUnstable, so I believe something like this would do the trick:

    * skip
    *_sync skip=false
Comment 7 Stef Walter 2014-01-08 10:36:17 UTC
Well I want to use the asynchronous versions in seahorse in vala code... Anyway, it's possible to endlessly play with this ... but I think the current solution is acceptable.