GNOME Bugzilla – Bug 675355
Generate VAPI from GIR and include it in GSSDP itself.
Last modified: 2019-02-22 09:29:22 UTC
First step migrating away from gupnp-vala and .gi files
Created attachment 213359 [details] [review] Make GSSDPError a registered type Together with the fix for bgo#670673 this will finally fix the errordomain matching in gobject-introspection
Created attachment 213360 [details] [review] Create vapi file from introspection The skipping of the error-domain in .metadata and the -custom.vala file are necessary due to https://bugzilla.gnome.org/show_bug.cgi?id=670673. They can be removed once that is fixed
Review of attachment 213360 [details] [review]: otherwise, looks good. ::: vala/gssdp-1.0.vapi @@ +1,1 @@ +/* gssdp-1.0.vapi generated by vapigen, do not modify. */ why are you adding generated vapi file to git?
Review of attachment 213359 [details] [review]: Otherwise, looks good. ::: libgssdp/gssdp-type-builtins.c.template @@ +1,1 @@ +/*** BEGIN file-header ***/ what is this? Seems like a generated file so shouldn't be in git?
(In reply to comment #4) > Review of attachment 213359 [details] [review]: > > Otherwise, looks good. > > ::: libgssdp/gssdp-type-builtins.c.template > @@ +1,1 @@ > +/*** BEGIN file-header ***/ > > what is this? Seems like a generated file so shouldn't be in git? That's not generated. That is the template file used to generate the enum stuff. See http://developer.gnome.org/gobject/unstable/glib-mkenums.html (In reply to comment #3) > Review of attachment 213360 [details] [review]: > > otherwise, looks good. > > ::: vala/gssdp-1.0.vapi > @@ +1,1 @@ > +/* gssdp-1.0.vapi generated by vapigen, do not modify. */ > > why are you adding generated vapi file to git? I'm cargo-culting vala. Only regenerate the vapi when you know something changed. If you look at the Makefile.am, you can see that the vapi is not generated automatically.
(In reply to comment #5) > > I'm cargo-culting vala. Only regenerate the vapi when you know something > changed. If you look at the Makefile.am, you can see that the vapi is not > generated automatically. Why? I think it should be done the same way as gir file.
Well mainly for the sake of simplicity to not check for the vapigen versions, assuming that a maintainer knows that the correct vapigen version (>= 0.15.x) is available.
(In reply to comment #7) > Well mainly for the sake of simplicity to not check for the vapigen versions, > assuming that a maintainer knows that the correct vapigen version (>= 0.15.x) > is available. Wouldn't the same appy to gir/typelib generation?
Created attachment 217757 [details] [review] Update patch to - Always generate vapi - Only try to generate vapi if gobject-introspcetion was enabled
Created attachment 217758 [details] [review] Make GSSDPError a registered type Updated to fix a typo in the include guard
Comment on attachment 217758 [details] [review] Make GSSDPError a registered type Not necessary anmore with latest introspection