commands, lifecycle: provide snapcraft try for core22
Metadata
Current evaluation
Merged. Adds snapcraft try support for core22 by mounting a host prime directory into the instance for lifecycle priming without packing. Approved by one reviewer, passed CI, and modified 8 files.
Suggested action: —
No scores available.
Issue body
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint`?
- [ ] Have you successfully run `pytest tests/unit`?
-----
This commit adds support for ``snapcraft try`` for core22 snaps. Just
like in the legacy version, this works by creating a ``prime`` directory
on the host that is then mounted into the ``/root/prime`` directory
inside the instance. The lifecycle then runs normally and the project is
primed but not packed.
CRAFT-1121
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds snapcraft try support for core22 by mounting a host prime directory into the instance for lifecycle priming without packing. Approved by one reviewer, passed CI, and modified 8 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Adds snapcraft try support for core22 snaps by mounting a host prime directory into the build instance. The lifecycle runs normally, priming the project without packing. Achieved 100% diff coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds snapcraft try support for core22 snaps by mounting a host prime directory into the instance. The lifecycle primes without packing. Resolves CRAFT-1121 with 100% diff coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4118 init: use core22 base for `snapcraft init` | snapcraft | merged | Merged. Updates snapcraft init to use core22 as the default base instead of core20. The command was relocated from snapcraft_legacy to snapcraft, and a spread test was added. Approved by reviewer and passed CI. | |
| #5616 feat(snapcraft_legacy): pack command runs the lifecycle | snapcraft | merged | Merged squashed PR that aligns the core20 snapcraft pack command with core22 and core24 by running the lifecycle. Approved by three reviewers with all CI checks passing. Resolves #5425. | |
| #3583 build providers: snapcraft's new base is core20 (CRAFT-544) | snapcraft | merged | Merged into master. Replaced core18 injection with core20 as the new snapcraft base. Approved by one reviewer, passed CI, and achieved 100% diff coverage. | |
| #4084 providers: inject current snapcraft snap into instances | snapcraft | merged | Merged. Injects the current snapcraft snap into build instances, enabling core22 builds with a parallel-installed snapcraft instance. Approved, passed CI, and achieved 100% diff coverage. Core18 and core20 support will follow in a subsequent PR. | |
| #5426 `snapcraft pack` should run the lifecycle for core18|20 in Snapcraft 7 | snapcraft | closed | Closed for Snapcraft 7. Fixed in Snapcraft 8.11 via merged pull request #5425, enabling snapcraft pack to run the lifecycle for core18 and core20 bases. | |
| #4186 snap: migrate to core22 | snapcraft | merged | Migrated the snap build environment to Ubuntu core22. Approved by two reviewers and passing CI, the change was merged into the main branch, increasing overall code coverage by 4.91%. | |
| #1 feat: add project for core22 + snapcraft 7 | snapcraft-rocks | merged | Merged adds a core22 and snapcraft 7 project providing a foundational build environment for hello snaps and chisel slices. Approved by two reviewers, the change adds 116 lines to a single file. | |
| #4166 Migrate Snapcraft to core22 | snapcraft | closed | Migrated Snapcraft to core22 by updating snapcraft.yaml and integrating the wheel factory snap for faster builds. Completed and closed via pull request #4186. | |
| #3579 snap: move base to core20 (CRAFT-509) | snapcraft | merged | Merged updates the snap base to core20. Approved by two reviewers with passing CI checks. Changes affect 13 files, increase coverage by 0.07%, and update initialization templates to core20. | |
| #6240 feat: recommend Snapcraft 9.x for core22, core24, and core26 bases | snapcraft | open | Adds a warning recommending Snapcraft 9.x for core22/core24/core26 bases. Approved by 1 reviewer but has 5 unresolved review comments and 4 failing CI checks. No activity for ~4 months. Closes #4958. |