GXml is near for ABI stability

Today I managed to create a patch to provide ABI stability for GXml and any other Vala library.

ABI is one of the more important aspect in a library; allows to produce binaries fixing issues and add features while the applications, depending on it, don’t need to be recompiled

Vala libraries need to add annotations in order to produce binaries interoperable with applications linked against an old version, Gee is the best example.

Now with the refered work, you can easily manage ABI without worrying about annotations, just take care on the order your virtual/abstract methods and properties are declared in your source code, in order to preserve your library’s ABI.

ABI stability for GXml

I’m taking a deep travel across Vala code; trying to figure out how things work. With my resent work on abstract methods for compact classes, may I have an idea on how to provide ABI stability to GXml.

GXml have lot of interfaces for DOM4, implemented in classes, like Gom* series. But they are a lot, so go for each and add annotations, like Gee did, to improve ABI, is a hard work.

I think is better to improve Vala code to produce ABI stability from the beginning; this will help GXml, GSVG (implementing W3C SVG 1.1 interfaces) and GSVGtk, to have abstract classes and interfaces with good ABI stability without change a line of code in them.

In the process, we can have reproducible API, that is: same C header from compilation to compilation of Vala code and when you add new API. Of course, this means that you should follow basic rules when write Vala code, but no more than the ones on the C side, well may be a few ones. When this is in place, you may add your library header to your repository to track changes to it; once a new API has been added, you should be able to take care about ABI and API, to make sure they are consistent over time.


Productive language for GObject, GType and non-GType based software.

GXml 0.16.0 Released

GXml is a library for XML access and GObject serialization to XML, with a W3C DOM4 API implementation.

Many bug fixes for XML access, serialization improvements and initial CSS selectors through DOM4 API,

GXml provides a powerful serialization frameworks, with different implementations, to provide flexible, fast and reduced foot print applications. Use GXml to access your XML documents using a GObject API, and thanks to Vala, your libraries can be used from C, Python, JavaScript and any other language with support for GObject Introspection.

Thanks to GXml’s Object Model (Gom) implementation, your GObject classes are XML nodes, with support for child nodes and dynamic properties and name spaces, with a great flexibility to read XML files in a format-free form, so your classes will be able to access past and future versions of XML files.

GXml is the motor for different projects, including SVG and Station Configuration Language,  allowing fast GObject API implementation based on specifications, like the one forW3C’s SVG 1.1, and XSD definitions.

This release arrives with a record of all bugs reports fixed. While may this is not good, because more users means more applications and more bugs, so having this number, should be considered just the beginning of a new cycle.

Next development cycle will be focused on API/ABI stability, add more CSS selectors implementations and improved performance for large set of XML nodes.

Many thanks for all contributors, bug reporters and translators.

Vala Warnings output Improvements

As for resent release of Vala 0.39.4, there are huge improvements if we talk about warnings output at Vala code and C code compilation level.

One of the argument against Vala, has been the number of warnings you get for a valid Vala code at C level compilation. As an example you can check warnings for GXml in March 2017 about 230, some were my fault but other at C level.

Resent rebuilt in January 2018 for GXml shows a drop to just 9 warnings. But the extraordinary thing is that no C level warnings at all! Remaining warnings are for missing features in GIR format and one from Vala code.

Hope to find time to publish resent Vala improvements this 0.40 development cycle.

Vala’s Abstract Compact Classes

From this bug, reports a bug on using abstract compact classes with abstract methods. This is perfectly usable in GObject derived classes or GType based, but no for compact classes, they are not any of above.

Because is possible to add pointers to a struct, as GObject does, I’ve managed to create a patch to add support for abstract methods in compact classes. They provide pre-defined implementations with warnings outputs, as for GType/GObject based classes, and is possible to override them in derived classes.

Compact classes are really cheap on resources and construction, you can create really useful and easy to use C API from them and can be introspectable if you define methods to access your struct members.

If you want a fully and friendly bindable C library written in Vala, I recommend you to use non-compact classes.

This should start to demystify an old argument that Vala is just for GNOME. Vala for for GObject and GType based applications, no matter it is targeting Linux, Windows or OSX. Its productivity is great and no other language, to day, have same level producing GObject/GType based applications without overhead.