Switch to GJS for plugins based in JavaScript
Currently we have Python enabled for plugins. That is a problem because PyGObject does not really support GTK 4 all that well yet. Additionally, there are a number of things in the Builder code-base that do not translate well to what PyGObject does support. Especially now that we are moving towards broader use of libdex which uses the same technology that GTK 4 does for GTypeInstance
instead of GObject
.
Now that libpeas has support for loading plugins from GJS, we should follow the same extension/addin design, but use GJS-based JavaScript modules for plugins.
There is little risk to this because we weren't using much of the Python standard libraries or pip's for features within Builder even when we did ship Python-based plugins. Most API usage wrapped GLib-based libraries or subprocess tooling.
All of these are easier with GJS, especially now that internally has async/promise API support. We may gain additional support in the future to make writing async/finish pairs easier as well. If we move towards Dex instead of async/finish pairs, that may even get simpler.