Re: Support vala plugins in gnome-settings-daemon
- From: Bastien Nocera <hadess hadess net>
- To: Timo Kluck <tkluck infty nl>
- Cc: gnomecc-list <gnomecc-list gnome org>
- Subject: Re: Support vala plugins in gnome-settings-daemon
- Date: Mon, 07 Nov 2011 18:14:33 +0000
On Mon, 2011-11-07 at 19:00 +0100, Timo Kluck wrote:
> 2011/11/7 Bastien Nocera <hadess hadess net>:
> Hi Bastien, thanks for your feedback!
> > We use the gnomecc list (copied) for gnome-settings-daemon and
> > gnome-control-center development, or you can find us on #control-center
> > on GIMPNet IRC.
> Thanks; I subscribed to the list and removed gnome-desktop list from the cc.
> > Is there any particular reason why you want to develop plugins in vala?
> For me personally, I would be unconformable writing plugins in C. I
> don't really doubt that I could do it, but I would be very happy with
> Vala doing the type system registrations the right way(tm) without me
> doing the details.
Being uncomfortable with writing the plugins in C is a pretty good
> I'm considering contributing a plugin for convertible tablets (such as
> Dell XT2, Lenovo X220T, HP Touchsmart tm2) that can handle things like
> rotating the display when the lid is swiveled. There's a lot of
> daemons for that that each work for only one or two models, and I
> thought I could unify that. Part of the project would be some
> additions to the existing xrandr plugin and those would of course be
> in C. But for the new plugin, I thought making a setup for Vala
> plugins might save time in the long run.
> (NB of course, I will ask you for feedback about these things later on)
This is something that we would want in gnome-settings-daemon, but we
already have plugins for this sort of functionality (see the orientation
plugin), and it seems to me that the majority of the work is below
gnome-settings-daemon itself (kernel driver to report the orientation,
and/or the status of the swivel, whitelisting of Wacom touchscreen
> > gnome-settings-daemon is not a general-purpose application, and I do not
> > know of any third-party plugins to it (meaning that all the plugins live
> > in gnome-settings-daemon
> That's why I thought I should put this in-tree as well.
> > and that, as maintainers, we would prefer
> > seeing plugins written in C).
> Can you explain why that is? For example, because of familiarity with
> C, because all the others are already in C, or for some other reason?
> One of the beautiful things of the plugin system you have set up is
> that it easily allows for what I'm trying.
- Vala is an immature language, and we very often have to make changes
just because Vala changed.
- It creates C source code which is hard enough to debug when we're
talking about a stand-alone application, but when you're talking about a
daemon that runs for the whole length of the session, you want to have
control over how your memory is managed.
> Of course, it does require that at least one maintainer is familiar
> with Vala -- someone should be able to review these things. Perhaps I
> should stress that this does not add any extra dependencies because
> the generated C files are distributed along with the vala sources. You
> only need the vala compiler when using gnome-settings-daemon directly
> from git. Similarly, the plugins do not suffer any performance penalty
> from being written in Vala.
The problem isn't so much reading or writing Vala (it's close enough to
other languages that one can "pick it up"), it's that it's not mature
enough to give us maintainability, or debuggability.
For your particular problem, the amount of code required in
gnome-settings-daemon to implement the functionality is minimal. The
problem is the work required in the lower levels of the stack. If you're
interested in the details for those, I'll add some more details to:
(This is the problem, isn't it?)
] [Thread Prev