Is there a way to share local plugins across snaps? Sometimes you want to re-use them in more than one snap, in that case you would ideally want them in their own separate repository so any snap using it can benefit immediately from changes. Although calling them “local” if this can be done would not be that accurate anymore
Thanks, that is a good suggestion. I did a quick try and git submodules can do the trick, if putting the plugin in the root of a repo and then adding to the target repo with:
This can work in my use case, but I feel it is limited too:
It would not be possible to use local plugins from more that one source
You need to explicitly clone with the --recurse-submodules option or init/update the submodules. There is no easy way to warn developers from snapcraft.yaml if they forgot or did not know about that (this is a generic problem with git submodule I think: the submodule.recurse config option does not apply to git clone)
I wonder if www.snapcraft.io will use --recurse-submodules by default when building a snap (it probably should if it is not doing it already)
So a solution integrated with snapcraft would still be interesting, I think.