cli: add lifecycle command stubs (CRAFT-764)
Metadata
Current evaluation
Merged into snapcraft/7.0. Added CLI stubs for pull, build, stage, and prime phases, falling back to legacy. Reorganized CLI tests and fixed version command tests. Approved and passed CI.
Suggested action: —
No scores available.
Issue body
Add handlers for the pull, build, stage, and prime commands. These
will be later used do run the parts lifecycle. All other commands
fall back to their legacy implementations.
Also moved CLI tests to a separate package for better organization,
and fix existing tests for the version command.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [ ] 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 `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged into snapcraft/7.0. Added CLI stubs for pull, build, stage, and prime phases, falling back to legacy. Reorganized CLI tests and fixed version command tests. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Implemented CLI stubs for pull, build, stage, and prime lifecycle commands. Refactored CLI tests into a separate package and corrected version command tests. Code coverage unchanged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Implemented CLI stubs for pull, build, stage, and prime commands to support the parts lifecycle. Relocated CLI tests to a separate package and corrected version command tests. Code coverage unchanged. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3683 commands: add snap command | snapcraft | merged | Merged into snapcraft/7.0. Implements legacy snap command support for package creation and fixes output parameter passing to managed instances. Approved by reviewer with passing CI checks. | |
| #1429 cli: properly handle exceptions in lifecycle | snapcraft | closed | Superseded by PR #1436. The changes improved lifecycle CLI exception handling, displaying user-friendly messages for SnapcraftError and tracebacks for other exceptions based on debug mode. | |
| #3572 cli & providers: pass part names for lifecycle commands (CRAFT-481) | snapcraft | merged | Merged after resolving initial test and mypy failures. Passes part names to managed snapcraft for lifecycle commands and fixes a type annotation. Approved by two reviewers with 100% diff coverage. | |
| #1746 cli: add version command | snapcraft | merged | Merged after reviewer approval and passing CI. Adds a CLI version command to snapcraft, resolving feedback on click message parameters, type checking, and whitespace before final merge. |