feat: add `needs_project` property
Metadata
Current evaluation
Merged craft-application PR #340 (commit 309aa73b), adding argument-aware needs_project handling and refactoring lifecycle commands; it fixed canonical/snapcraft#4769.
Resolution: closed resolved
Reason: craft-application#340 was merged as commit 309aa73b. The implementation adds AppCommand.needs_project(parsed_args) and reorganizes LifecycleCommands, directly resolving canonical/snapcraft#4769.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `tox`?
-----
Two things:
1. Refactors the LifecycleCommands classes in a slightly more organized way without changing any existing commands. This is required for snapcraft to define its own `Pack` command with minimal duplicated code (https://github.com/canonical/snapcraft/pull/4794)
2. Add a `needs_project` property, which can determine if a project needs to be loaded based on the provided arguments.
Fixes https://github.com/canonical/snapcraft/issues/4769
(CRAFT-2861)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged craft-application PR #340 (commit 309aa73b), adding argument-aware needs_project handling and refactoring lifecycle commands; it fixed canonical/snapcraft#4769. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #340 via commit 309aa73b, adding needs_project and lifecycle command refactoring; released in 2.7.0 and enabled Snapcraft #4794 to fix #4769. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged LifecycleCommands refactoring and needs_project argument handling, enabling Snapcraft's directory-aware Pack command and fixing snapcraft#4769. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds a needs_project property and refactors LifecycleCommands classes to enable snapcraft's custom Pack command with minimal duplication. Approved by two reviewers and passed CI checks. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#4769
(confidence 100%)
Snapcraft issue explicitly identified as fixed by this PR.
-
Related To:
canonical/snapcraft#4794
(confidence 95%)
Snapcraft Pack command work required this command organization and project-loading API.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #238 feat!: remove optional project commands | craft-application | merged | Merged in craft-application#238 via a0a3ed47, removing optional/optimistic project loading introduced by #213 while retaining relevant tests. |