Igor Ljubuncic from the Canonical team published a blog post that explains the company’s plans for Snapcraft, a software packaging and distribution platform developed by Canonical, creators of Ubuntu Linux. According to the announcement, the company is currently focusing on breaking Snapcraft apart into smaller, modular, and reusable components. The new approach allows developers to utilize these components across a range of different products.
Future of Snapcraft
The new approach will use generic parts builder based on craft-providers and craft-parts, with added Snapcraft functionality as a separate layer. The work done so far includes:
- The current Snapcraft codebase is now considered legacy. The main entry point of this package is executed when fallback to legacy Snapcraft is required.
- Legacy Snapcraft keeps project configuration data in dictionary form. This was changed to use a pydantic model. Likewise, the JSON schema will need to be maintained separately.
- A simple prototype was made using the core22 base (development image), resulting in an installable snap package containing a test application.
Canonical also stated that some technical challenges should be addressed, such as data validation on a global level, grammar processing, extensions, part information adoption, Appstream info adoption, Snapcraft-specific plugins re-implementation as application plugins for craft-parts, or binary file patching.
Ljubuncic also stated that projects with core18 and core20 will use monolithic Snapcraft, as usual. The new approach will be used for core22 and later. To decide which implementation is required, a fallback mechanism will be placed. Thus, projects can continue using Snapcraft and they won’t be affected until they move to the new base.