GNOME Bugzilla – Bug 702872
libanjuta: create .vapi files from girs
Last modified: 2020-11-06 20:22:24 UTC
See attached patch.
Created attachment 247528 [details] [review] libanjuta: create .vapi files from girs Remove the static libanjuta-3.0.vapi file from language-support-vala and use the libanjuta-3.0.vapi and libianjuta-3.0.vapi created as part of the libanjuta build. Also fix new compile errors.
I haven't much knowledge of vala so if you think it's working you can commit them. Else Abderrahim has taken care of most code related to vala in Anjuta.
Review of attachment 247528 [details] [review]: I feel that there are some unrelated changes, and have some concerns. FWIW, here is the script I'm currently using to generate the vapis: vapigen --pkg gtk+-3.0 Anjuta-3.0.gir --library libanjuta vapigen --girdir . --pkg gtk+-3.0 IAnjuta-3.0.gir --library libanjuta-interfaces cat libanjuta.vapi libanjuta-interfaces.vapi > libanjuta-3.0.vapi mv libanjuta-3.0.vapi ../plugins/language-support-vala/ Some specific comments follow. ::: configure.ac @@ +315,3 @@ [ PKG_CHECK_EXISTS([ libvala-0.18 ], [ valaver="-0.18" ], + [ PKG_CHECK_EXISTS([ libvala-0.22 ], We generally accept only 2 versions of vala, it's safe to drop vala 0.18 now (and I prefer to have this in a separate commit) @@ +338,3 @@ + + VAPIGEN=`$PKG_CONFIG --variable=vapigen ${LIBVALA}` + AC_SUBST(VAPIGEN) You also need to update the dependency on gobject introspection to 1.33.3 (I think), to have a bugfix concerning errordomains. ::: libanjuta/Makefile.am @@ +319,3 @@ +if ENABLE_VALA + +noinst_DATA = libanjuta-3.0.vapi libianjuta-3.0.vapi I think it's better to have a single vapi libanjuta-3.0.vapi containing both, as the vapis follow the pkg-config name, and anjuta has only one. And I think it's better to install the vapi. (needs confirmation from other devs though) There are also other changes that feel cosmetic to me, I'm not sure what to think of them (like moving all the variables to the top of this file, and using += even for variables that aren't used in the conditional) ::: plugins/language-support-vala/plugin.vala @@ +19,3 @@ using Gtk; using Anjuta; +using IAnjuta; The changes to this file are unrelated AFAICT, they shouldn't be in the same commit. And they seem cosmetic to me, so perhaps just drop them.
> ::: libanjuta/Makefile.am > @@ +319,3 @@ > +if ENABLE_VALA > + > +noinst_DATA = libanjuta-3.0.vapi libianjuta-3.0.vapi > > I think it's better to have a single vapi libanjuta-3.0.vapi containing both, > as the vapis follow the pkg-config name, and anjuta has only one. And I think > it's better to install the vapi. (needs confirmation from other devs though) Creating just one .vapi file would needs some extra rule to concatenate them both together. I don't really see the point of merging them. I also don't think we should install them since we don't really have a stable API. > There are also other changes that feel cosmetic to me, I'm not sure what to > think of them (like moving all the variables to the top of this file, and using > += even for variables that aren't used in the conditional) > > ::: plugins/language-support-vala/plugin.vala > @@ +19,3 @@ > using Gtk; > using Anjuta; > +using IAnjuta; > > The changes to this file are unrelated AFAICT, they shouldn't be in the same > commit. And they seem cosmetic to me, so perhaps just drop them. This fixes some compile warnings and that IAnjutaEditor::code-added is now IAnjutaEditor::code-changed. This is the main reason I want to generate the bindings during build since atm. you don't even notice that the vala plugins are broken.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/anjuta/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.