Well, because of AI coding, it is easier to create something that is working. (I am not making any statements about quality), so a plugin system would open up darktable to people that just want to experiment.
Having said this. The other route may be more functionality in Lua (although I don’t see how that would work in the pipeline)
Answering the title question as a user: Do we need plugins? : Hell NO.
Why not (just of the top of my head):
no user advantage compared to modules
no guarantees a third-party plugin plays nice with the existing modules or other plugins
no guarantees that edits or styles can be shared (“you need plugin X for this style”, but plugin X doesn’t exist for my OS).
no guarantee that a plugin still exists/works with the then-current version of darktable in a few years (potentially making me lose my edits using that plugin). At the moment I can change OS and keep my old edits…
And let’s be honest, many plugin authors will feel no need to propose their code for inclusion in “official” darktable, when that means they have to rewrite their code as a module (besides writing documentation).
Of course there are advantages for module developers. (and disadvantages: they have to provide plugin versions for each OS, where they only have to provide one version in module code)
I don’t see any advantages for the end users.
Are there any for the maintainers?
And frankly, the playraw exemple is a red herring for me: I can decide to get the development version, and even install it so that it doesn’t interfere with the “official” version.
Well, then the user or creator can just place it somewhere else? If it looks bad, move it somewhere else. This can be documented in the plugin modules themselves.
Yes, this would be easily solved with a simple disclaimer “You are at your own risk” etc. Obviously someone doing serious work in which he requires edits to stay valid for years would not do those important edits with additional dependencies.
This is not a risk at all… The xmp is mostly a list of KVP entries and it would be written by darktable anyhow. This is a very simple implementation detail. darktable simply asks the module for its parameters in a known data format, that’s it.
Yes, that’s the only solution. It was hard coded long time ago and I have reworked all this part and removed the ability to publish new plug-in (even if it was not ready). But the need to dynamic ordering of the pixelpipe (moving module order) was incompatible with the previous way of ordering the module.
Also, note that we should then support all aspects:
The code itself - module (that’s the easy part)
Publishing the order (yes relative to another one)
A way to create a new workflow based on a new module (like sigmoid, agx…)
A way to add the new module to a workflow preset
But the messy part is that if not supported by Darktable then the module could just disappear… What to do with XMP referencing it? A proper way to recover, reset the module order as recorded into XMP…
False. Users who are curious can easily try new plugins without having to install multiple versions of the whole application. There is a reason if plugin systems are used extensively across all application domains.
False. One defines an appropriate ABI and the plugins play nice with each other. The level of effort that goes into the ABI design is what ensures different levels of QoS.
So? We are talking about experimental usage. Testing out experimental features. If something is well received and darktable wants to merge it, it becomes part of the standard release.
Yes, that’s what stable releases are for. Also, not what we are talking about.
But that’s their problem, and of the users of the experimental plugins. How is it different from people trying out the various experimental builds that we have around? There is no guarantee that any of the things that are floating around will ever be merged. People who incorporate them in their workflow do it knowing that they are taking a risk.
For developers it would be significantly easier and more efficient. The module code would still be one. It would just be built for multiple platforms. How do you think that custom darktable builds are shared? There is a system that builds the WHOLE application for each supported platform. This is very wasteful. If we had a plugin system, one would need to build a single module instead of the whole shebang.
Easier to try out new stuff
Easier to try out several new things at once
Less stuff to downloads
Simpler installation process
Simpler setup, only one darktable binary. Runs in production mode by default, add one flag and run in experimental mode, where you can play with new toys.
Arguably, yes. You get to consider something for inclusion after seeing how the community responds to it and after it received some testing.
Do the devs want to consider a new module (or a new version of an existing one) for merging? Instead of downloading (or building) a whole new application, installing it etc., just download a single library file, copy it in a designated directory and fire up darktable.
As we already said before, it should be made clear that there is no support whatsoever for plugin workflow and error reports where plugins are involved. The devs would only support the infra, not the actual payload that uses it.
See above, much more complicated and wasteful.
Also, it is much easier to enforce data safety with a plugin system than it is with a full experimental release. A processing module would have a narrow ABI that only allows it to communicate with the darkroom. The worst thing that it could do is break an edit, mess up the canvas or freeze the darkroom. Not a big deal. Quit the app, delete the plugin and you are good to go again. Through the ABI the application that hosts the plugin can ensure that no writes happen to the data dir and to the DB when plugins are in use, thus ensuring that the user’s data is safe.
On the other hand, a full release of the application can do anything to your system, and there is no way for the production instance of darktable installed on your system for preventing it from doing it.
But that would be perfectly ok. We are talking about simplifying the process by which new modules are exposed to the community for triage, before they even enter the PR process.
People who would use them as part of their workflow would be making a mistake, and this should be made very clear. A plugin would be an ephemeral addition to a darktable installation, not a stable part of it.
Actually, as I was saying above, we could put a lot of safeties in place in the main binary to enforce that plugins are only used in this fashion (no DB writes, all edits stored as XMPs in temporary dirs).
This would actually make for a safer environment for experimenting with new modules, much better than having multiple installations that can mess with your data in so many ways.
You could have a --plugins-dir experimental flag to point darktable to a directory with plugins. If the flag is present, we would force --library :memory:, disable writing to the config dir (or make a copy of the configdir and serve it from there) and funnel all output to a temprary dir. Much easier and safer than what we have now.
I suppose plugins could also serve as a trial space for new modules, maybe with a way of providing feedback and submitting bug reports built in, I noticed rawtherapee has a kind of meta module now with a bunch of different algos in it
The dev workload has drastically increased. I used to deal with 1 - 10 issue/PR changes per day and now a normal day is 50+ changes. I’m not sure how @Pascal_Obry handles all of it as he’s dealing with all of it and at a deeper level.
I’m also starting to see what AI is better at (adding things to darktable, such as modules) and what it struggles with (digging deeply into the internals such as gtk4). 20-20 hindsight says that maybe we should have turned AI loose on the gtk3 implementation and cleaned it up before trying to convert it all to gtk4.
The only way I would be in favor of something like this would be
it’s a compile time option for self compilers only
it doesn’t get distributed in a release turned on. If it does then any issues arising from it go to the packager and not darktable.
it gets NO support for any issues arising from a plugin (if you run a plugin and darktable misbehaves, don’t report it as a darktable issue).
I defer to the developers and maintainers of Darktable here, but as a user it would be nice if someone created a new module for evaluation or as a finished product and I could just add it to DT as a plugin. Of course I would not expect any support if the plugin failed or corrupted my DT version. But I appreciate current maintenance must all ready be huge and I wouldn’t won’t to see any further burden added.
I agree with you @Terry.
I think I would appreciate the ease of use in regards to testing upcoming modules or whatnot.
If the base modules were kept as “built-in modules” with external plugin modules being marked as “not officially supported”, then I think most users would understand if they broke or were no longer supported, etc.
It makes me think of all of @Christian-B 's work. If plugins were a thing, then he could have made his modules as plugins and it would have been much easier for everyone to test them, without worrying about building things themselves.
Also, a plugin system would help in this case:
if a plugin module was not officially approved for inclusion in darktable by the devs because maybe it replicates too much behavior or something else, but some users really like it, they could choose to include it manually if it is made as a plugin.
I don’t use it for porting the UI, but it has done a pretty good job at creating the GUI threading doc (PR pending) and finding bugs. I simply gave it the GTK 3 and 4 source code, plus that of darktable.
Regarding the workload it puts on maintainers, I completely agree. Many FOSS projects are drowning in PRs, and for many crucial ones, they are security-related. With the PR or bug report out in the open, people are already using AI to create exploits at scale.
Davinci Resolve has slowly become a mere launcher for DCTLs and plugins for many.
And it’s not all rainbows and roses for it either- old unmaintained add ons break and sometimes even crash resolve itself.
I think a way to show a grayed out area for incompatible modules and this near export would be ideal.
Additionally if an XMP has an extra tool than the ones I have, it can show me a notification that I need that plugin.
I like what kofa explained although my technical knowledge makes it a blur .
I can already think of someone I know making a plugin for quad bayer remosaic or someone adding stuff that is niche enough to be not considered worth adding but important enough for the nicher userbase to have. The idea of such a plugin system is very good, it’s the implementation and robust architecture around it is the only part of debate left undecided.
@Masterpiga : You reason from the point of view of a module developer or a user who wants to try new tools before they are in stable releases.
I reason from the point of view of a user who is not interested in using experimental stuff, but just wants to edit his images, with as little hassle as possible.
And from that viewpoint, your five advantages for the end user are non-existant.
@Yogansh_Bhatt : You show why a plugin system can be bad, and then suggest it as a good thing?
For those niche users, do you have a concrete example? It may be that they are better off using a different program for that niche work. That something can be done, doesn’t mean it’s the best solution.