I’ve found there is a lot of repetition in the snaps I’m working on (e.g. to do with setting up the graphics stack for IoT). Some of this can be addressed by including stage-snaps, but there remain interfaces, environment variables and command-chain options that need to be cut & paste each time.
That sounds like a job for snapcraft extensions. But is there a way pull in user-written extensions locally? (I anticipate quite a bit of “churn” as I try retrofitting across different snaps.) Is it necessary to have them accepted into the snapcraft project and, if so, what’s are the criteria for inclusion?
I’ll exhume this and ask the developers again: Will it ever be possible to include local extensions? There are local plugins, so someone saw the need for those too. Local/out of tree extensions could be collected/published somewhere on the forum and enable a flourishing development community like e.g. on GitHub Actions.
We used to have something called wiki-parts which were something like this. One of the goals of extensions was to have a controlled environment where changes would take place, we can of course revisit that.
I’m thinking more like shipping a python file with a class inheriting from Extension in snapcraft.internal.project_loader._extensions. Snapcraft would load this from snap/extensions. Installing such extensions would be a matter of adding a git submodule.
Yes, I’ve seen this before, and it looks very useful. Chaining tools to do the job is very classic Unix philosophy for me.
I’m just saying that many successful platforms have embraced the plugin/store pattern, and it gets the momentum going like nothing else. See GitHub Actions, see Visual Studio Code, see FreeCAD (Python workbenches, a stroke of genius!), OBS Studio…
So if we have a properly designed extension API already, which remains somewhat stable (and is versioned, like plugins are), enabling loadable extensions seems like a logical step.