Please, sit down.
We’re breaking API. Specifically, anything that uses imports.dbus.
No wait, wait! Before you get out your pitchforks, this is necessary to modernize our JS language bindings (cjs) or (possibly) eliminate cjs and just use upstream gjs. The old dbus bindings that we were using were becoming progressively more out-of-date with respect to the underlying dbus system, causing random freezes, deadlocks, and other nasty things. Also, as the JS implementation we use evolved, upstream gjs has become much better at garbage collection and memory management.
On my development branch for this, which is running upstream gjs currently, I’ve had no freezes, no crashes, a smaller memory footprint for Cinnamon (with less growth), and it’s seemed actually faster overall (though this is only empirical.) I think this will be a very positive thing for the health and future of Cinnamon.
Any applet that currently uses imports.dbus will need to switch over to Gio.DBus instead. It appears superior, and actually simplifies code in many places. I’ve added sort of a library for common dbus interfaces (like those provided by cinnamon-settings-daemon, and media player interfaces) – you can see it here. I’d like to attempt to keep these in one place, and not have them duplicated across applets and whatnot – this way, if the interfaces change, we need only fix them here, instead of applet devs (or users) trying to figure out what changed. I also provided easy constructors for these – both synchronous and asynchronous. However, unless you have an extremely good reason not to, always use the async methods, to prevent any blocking of the Cinnamon thread. This actually applies to any type of i/o operation – never use synchronous.
All of Cinnamon has been ported over (at least that I can find!) So there should be plenty of examples of how to make the switch. I’ll do whatever I can to help out, answer questions, debug, whatever, to get you moved over (#linuxmint-dev on Spotchat IRC, email@example.com).
One thing to note… I’ve just scratched the surface with my dbus knowledge – this effort was a decent learning experience, but feel free to make suggestions or corrections.
The only serious issue I’ve run into so far, is that properties can supposedly now be accessed simply by foo = proxy.SomeProperty. In practice, this doesn’t work reliably – specifically for org.mpris.MediaPlayer.* providers so far. I’m almost certain it’s just buggy implementations on the music players’ parts – Audacious, for instance, works just fine, while banshee, clementine, and vlc (and perhaps more) don’t seem to notify of updates to some or all of their properties. To work around this, I have to basically resort to the old behavior, using the org.freedesktop.DBus.Properties interface to perform a Get on the property I want – it works fine when I do this. If you look at the stock sound applet, you’ll see where this has been done.
These changes could land in master as early as this weekend yet, but probably not until sometime this coming week. If you want to see how it runs, you can check out my branch. You’ll have to be running the latest of all other Cinnamon dependencies, as well as install the gjs and gjd-development packages for building and running.
We need to do a small maintenance release to current cjs, hopefully this coming week. Once this has been done, your newly-migrated applet should remain 100% compatible with the current Cinnamon release. Although for now, you’ll have to supply your own interfaces.
We don’t do this lightly – we’ve always tried our best to not break applets and extensions, but this actually should have been done a couple of releases ago (it was complicated by having to support older Mint releases at the time), and I think, in this case, that the benefits outweigh the costs.