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 702872 - libanjuta: create .vapi files from girs
libanjuta: create .vapi files from girs
Status: RESOLVED OBSOLETE
Product: anjuta
Classification: Applications
Component: libanjuta
unspecified
Other All
: Normal normal
: ---
Assigned To: Naba Kumar
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-22 19:54 UTC by Carl-Anton Ingmarsson
Modified: 2020-11-06 20:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libanjuta: create .vapi files from girs (118.12 KB, patch)
2013-06-22 19:54 UTC, Carl-Anton Ingmarsson
needs-work Details | Review

Description Carl-Anton Ingmarsson 2013-06-22 19:54:02 UTC
See attached patch.
Comment 1 Carl-Anton Ingmarsson 2013-06-22 19:54:04 UTC
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.
Comment 2 Sébastien Granjoux 2013-06-23 17:08:54 UTC
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.
Comment 3 Abderrahim Kitouni 2013-07-27 20:34:12 UTC
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.
Comment 4 Carl-Anton Ingmarsson 2013-08-15 18:29:07 UTC
> ::: 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.
Comment 5 André Klapper 2020-11-06 20:22:24 UTC
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.