GNOME Bugzilla – Bug 654502
Allow building with libvala-0.14 (0.13 development tree)
Last modified: 2011-07-25 08:51:56 UTC
Created attachment 191844 [details] [review] Detect libvala-0.14 Currently, anjuta checks for libanjuta-0.12 and does not have knowledge about the upcoming 0.14 tree (which, so far, is API compatible). The attached patch extends configure.ac to be able to also detect libvala-0.14. I introduced VALA12_REQUIRED and VALA14_REQUIRED in order to distinguish the required patch level of both trees). When 0.14 is found, it is favored over 0.12 (which, imho, makes sense). The patch has been tested for 'build' only.
Created attachment 191845 [details] [review] Reformatted patch Fixed some indent issues on the patch.
Review of attachment 191845 [details] [review]: Thanks for the patch, however, it is missing the Makefile.am in language-support-vala, see http://git.gnome.org/browse/anjuta/tree/plugins/language-support-vala/Makefile.am. The correct solution is probably to set a $(LIBVALA) variable in configure.ac pointing to libvala-0.14 or libvala-0.12 and using this in the Makefile.am
Johannes, Thanks for that pointer! I will add some more lines to the patch (It did not fail here as I do not have valac installed and as such libvala is being used, but the vala files are not recompiled... )
Created attachment 191901 [details] [review] Updated patch introducing a new variable LIBVALA which is replaced in Makefile.am throghout the tree is needed. This should address the comments from earlier.
Thanks, this patch looks good! http://git.gnome.org/browse/anjuta/commit/?id=e617e923a9280da3c02c6fbf195a2a5c9e6f450b This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
I don't like this: if libvala is changing its API version, it is because it is broken regularly. But the problem here is something else, even the bindings aren't very stable either, and it needs this change to build with vala 0.13 (no time to make a proper patch, I'd like to discuss how to fix things first): diff --git a/plugins/language-support-vala/plugin.vala b/plugins/language-support-vala/plugin.vala index b64bc81..235c49d 100644 --- a/plugins/language-support-vala/plugin.vala +++ b/plugins/language-support-vala/plugin.vala @@ -245,10 +245,10 @@ public class ValaPlugin : Plugin { if (source_file.filename != file.get_path()) continue; - string contents; + uint8[] contents; try { - file.load_contents (null, out contents, null, null); - source_file.content = contents; + file.load_contents (null, out contents, null); + source_file.content = (string) contents; update_file (source_file); } catch (Error e) { // ignore
If there are API changes we should check if it's worth to support 0.12 in master because we are targetting GNOME 3.2 anyway. Sorry for committing this change but I assume people check that their patches really work and that there were not API changes that affected us.
Created attachment 192534 [details] [review] vala: bgo#654502 - Allow building with libvala-0.14 (0.13 development tree)
Review of attachment 192534 [details] [review]: Thanks!