create generic init implementation
Metadata
Current evaluation
Generic init support was merged in PR #522 via commit f2a4becf, adding a reusable init service and command for craft applications.
Resolution: closed resolved
Reason: Resolving PR #522 and commit f2a4becf added the shared init service and init command requested by the issue.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
Generic InitCommand should be created, so all the crafts can use it, that allows:
- specifying `name` as an option and `project_dir` as a positional argument (the way `cargo` / `uv` works)
- use Jinja2 for templates
- support profiles e.g. by searching `templates` for subdirectories and listing them as options
- by default it will allow to be run in non-empty directory, as long as it creates only new files (no-overrides). This behavior may be overwritten (opt-out), so charmcraft will be able to error-out in non-empty directory
### Why it needs to get done
Currently all the applications have a separate way of handling `init`.
We should create a generic version, that everyone can use.
It will enable create specific profiles in snapcraft, make our codebase smaller and it will be easier to maintain in the single place.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Generic init support was merged in PR #522 via commit f2a4becf, adding a reusable init service and command for craft applications. | |
| stealth/space-bunny-alpha | — | closed resolved | Implemented a reusable init service and command in canonical/craft-application#522 (commit f2a4becf), centralizing initialization across craft applications. | |
| stealth/space-bunny-alpha | — | closed resolved | Implemented the generic init service and command in merged PR #522 (commit f2a4becf), shipped in craft-application 4.4.0. | |
| stealth/space-bunny-alpha | — | closed resolved | Implemented in craft-application PR #522 (commit f2a4becf), adding a reusable init service and command to centralize initialization for craft applications. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The proposal to unify project initialization via a generic InitCommand received only an automated Jira sync. No discussion, code changes, or resolution occurred, indicating the feature was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The generic InitCommand feature request was synced to internal Jira tracking (CRAFT-3335) but never progressed to a pull request or code changes, indicating the feature was deferred or abandoned. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-application#522
(confidence 100%)
PR #522 directly implemented the requested generic init functionality in commit f2a4becf.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #439 feat: add generic init implementation | craft-application | closed | Generic init was delivered via #522 instead, merging InitService and the init command with profile support and tests in commit f2a4becf for 4.4.0. |