Vala 0.13.0 released

after two months of active development, the Vala programming language has reached version 0.13.0.


  • More refactoring in the code generator.
  • Improvements to the .gir reader.
  • Switch JSON-GLib bindings to .gir.
  • Drop deprecated support for D-Bus GLib in favor of GDBus.
  • Many bug fixes and binding updates.

Some numbers: 314 commits and 94 bug fixes since version 0.12.0. So this new development release is a mix of enhancements and fixes.

A noteworthy change is the deprecation of copying delegates. A delegate is copied when it is assigned to an owned delegate variable like this:

SourceFunc a = () => false;
SourceFunc b = a;

You will get a warning: "copying delegates is discouraged" or "copying delegates it not supported". This is because of the nature of delegates in glib. Owned delegate variables have a related target and a GDestroyNotify, but it's not known how to copy/ref the target. Therefore, it's impossible to copy/ref a delegate target.

So, how do we shut the warning? There are two ways:

1) If you don't need owned delegate, you can assign to an unowned variable like this: unowned SourceFunc b = a;
2) If you want to transfer the ownership: SourceFunc b = (owned) a; After this, you can still invoke a() but the target will not be destroyed anymore when a runs out of the scope.

You might experience the same warning for delegate properties as well, like this:

public SourceFunc func { get; set; }

Here there are two solutions:
1) If you need owned delegate, use owned set like this: public SourceFunc func { get; owned set; }, while keeping the getter unowned.
2) If you don't need owned delegate: public unowned SourceFunc func { get; set }

It must be noted that due to a bug (now fixed in this release), although you defined an owned delegate property, it was practically unowned.


Vala 0.12.1 released

the new stable version 0.12.1 of the Vala programming language has been released.

Release notes are "Many bug fixes and binding updates.".
From a quantitative view point, this release fixed 42 reported bugs plus other 30 commits with fixes.

Stay tuned for the 0.13.0 development release

More information and download at the Vala homepage.