I’m trying to test a V2 Plugin with snapcraft 7.1.4 and with base: core22. I’ve followed this post but when I’m trying to build my core22-based snap, snapcraft always complains
- plugin not registered
Has the local plugin support been changed/removed in snapcraft 7.x?
That’s correct, local plugin support is not currently available for core22. To use local v2 plugins you need to stay in core20 until we have this functionality properly redesigned.
This may come in a different form than what’s available today, to prevent possible issues with e.g. Python interpreter compatibility, or to avoid exposing too much of the internals to the external plugin implementation.
I made a V2 plugin to compile a Ruby interpreter using ruby-install (see PR). Often times you can’t use Ubuntu’s ruby package because you want something custom, cross-compile for ARM64, a specific version of libssl, or jemalloc memory allocator, or simply need a more up-to-date version of Rubygems and you can’t update the one installed by APT. Calling a self-built Ruby from a inside a Snap is also much easier than with the ruby-package.
I was hoping my plugin would work on core22 because the multi-arch stuff seems to actually work on core22 (at least it produces two different snap files). So yeah, can’t use core22 because of my plugin, and can’t use core20 because of cross-compiling for ARM64.
I’ll have a look, this could be an interesting plugin to add to craft-parts (which would make it available for Snapcraft base core22, Rockcraft and other tools).
There are no plans to add support for local plugins in the foreseeable future. The suggested alternatives are to use the nil plugin with override- keywords, help add support for additional build tools as official plugins (whether via a feature request or a PR in craft-parts), or use extensions.