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 792431 - Use native GObject introspection for Vala
Use native GObject introspection for Vala
Status: RESOLVED FIXED
Product: gexiv2
Classification: Other
Component: bindings
unspecified
Other All
: Normal normal
: ---
Assigned To: Gexiv2 Maintainers
Gexiv2 Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-11 14:11 UTC by Corentin Noël
Modified: 2018-01-11 18:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use native GIR functions (4.58 KB, patch)
2018-01-11 14:12 UTC, Corentin Noël
committed Details | Review
Fix GIR and .vapi without API change (2.39 KB, patch)
2018-01-11 15:13 UTC, Corentin Noël
committed Details | Review

Description Corentin Noël 2018-01-11 14:11:37 UTC
We don't need the .metadata file when everything is fixed :)

Here is a patch that fixes the previously wrong introspection with meson
Comment 1 Corentin Noël 2018-01-11 14:12:03 UTC
Created attachment 366661 [details] [review]
Use native GIR functions
Comment 2 Jens Georg 2018-01-11 14:38:30 UTC
(In reply to Corentin Noël from comment #0)
> We don't need the .metadata file when everything is fixed :)
> 
> Here is a patch that fixes the previously wrong introspection with meson

I'm missing context here. What exactly is fixed?
Comment 3 Corentin Noël 2018-01-11 14:50:08 UTC
Right, so here is the context:
There used to be a gexiv2-custom.vala file that was forcing the prototype of some functions, and that's not good when the introspection already does all the thing. This file was missing in the meson port but I suggest to just remove it and go back to the native introspection solution

Also there is the GExiv2-0.10.metadata file that is here when there are introspection issues.
This file contained a cheader_filename argument to override the C header files that was written in the .gir file and was wrong. I just fixed that by adding a -c-include argument to the GObject introspection scanner (so that this change makes that any language using the C header file will be correct)
It also contained a bunch of "skip" elements that are not needed at all because of the removal of the -custom.vala file and because some were just hiding some deprecated methods…

Software depending on this will have to be updated accordingly but it's something that they would have to do anyway (mostly affecting Shotwell and elementary Photos)

TL;DR: in the meson port Metadata.from_app1_segment and Metadata.open_buf were missing, re-establishing them in the right way.
Comment 4 Jens Georg 2018-01-11 15:00:44 UTC
No. Removing it will change vala api. That's why it was added in the first place. This should be only done with a clear cut and I would suggest doing it when breaking API anyway, but not in the middle of the current stable series
Comment 5 Corentin Noël 2018-01-11 15:13:08 UTC
Created attachment 366662 [details] [review]
Fix GIR and .vapi without API change

Right, I can understand the will to keep the API stable, here is the change doing only the right things
Comment 6 Jens Georg 2018-01-11 18:26:33 UTC
Pushed original patch to wip/0.12, new patch to master. Thanks