← Back to issue list

refactor: use init command from craft-application

View original Github issue

Metadata

Project
snapcraft
Number
#5129
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #5129 (de05a733d) replaced Snapcraft’s init command with craft-application’s, fixed #5098, and added name, profile, and project-dir options.

Resolution: closed resolved

Reason: PR #5129 was approved and merged as commit de05a733d, adopting craft-application’s init implementation and resolving #5098.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `tox run -m lint`? - [x] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`) ----- Replace Snapcraft's `init` implementation with craft-application's implementation. Somehow I added more lines of code :upside_down_face: There are no behavioral changes with just `snapcraft init`. However, the command now accepts additional parameters added in craft-application: `name`, `profile`, and `project-dir`. Fixes #5098 (CRAFT-3543)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #5129 (de05a733d) replaced Snapcraft’s init command with craft-application’s, fixed #5098, and added name, profile, and project-dir options.
stealth/space-bunny-alpha — closed resolved Merged PR #5129 as commit de05a733d, replacing Snapcraft's init implementation with craft-application's and adding name, profile, and project-dir options. Fixes #5098.
stealth/space-bunny-alpha — closed resolved Merged PR #5129 as de05a733d, replacing Snapcraft's init implementation with craft-application's and adding name, profile, and project-dir options. Fixes #5098.
qwen/qwen3.6-35b-a3b — — Merged a refactor replacing Snapcraft's init command with craft-application's implementation. Introduces name, profile, and project-dir parameters, resolves #5098, passed CI, and received two approvals across 23 changed files.
qwen3.6-35b-a3b-mtp-q6 — — Merged update replacing Snapcraft's init command with craft-application's implementation. Adds name, profile, and project-dir parameters while preserving existing behavior. Resolves #5098.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#5098 (confidence 100%)

    PR #5129 explicitly fixes the init-command migration issue.

  • Likely Fixed By: canonical/craft-application#522 (confidence 95%)

    Merged upstream implementation provided craft-application’s reusable init command.

Related issues

Issue Project State Summary Similarity
#5098 Use upstream `init` command from craft-application snapcraft closed Snapcraft adopted craft-application's init command in merged PR #5129 (commit de05a733d), preserving behavior while adding name, profile, and project-dir options.
84%
#1520 refactor: remove old "init" command implementation charmcraft merged Merged PR #1520 in commit 97fa9229, removing 248 lines of obsolete init command code after the craft-application transition.
77%
#1153 Move the init command to craft-application charmcraft closed Init moved to craft-application and was adopted by Charmcraft in merged PR canonical/charmcraft#1340; upstream PR canonical/craft-application#522 landed it in commit f2a4becf.
75%
#360 Migrate non-lifecycle commands to craft-application rockcraft closed Resolved by merged PR #761 (commit 484099f5), which adopted craft-application’s upstream Init command/service and added --project-dir support.
75%
#5239 refactor: use craft-application's remote-build snapcraft merged Merged PR #5239 as f31d99498, replacing Snapcraft’s legacy remote-build path with craft-application’s command for CRAFT-4044.
73%
#1340 feat(craft-app): move init command charmcraft merged PR #1340 by lengau merged, relocating charmcraft's init command into craft-application (with the init service/command/tests) plus lint fixes (+500/-343, 18 files). Later cleanup commit 97fa9229 (#1520) removed the old implementation.
73%
#4682 refactor(app): use more code from craft-app snapcraft merged Merged as c9b6941d4, replacing Snapcraft-specific application logic with craft-app functionality (36 additions and 49 deletions across three files).
72%
#4560 feat(craft-application): initial support snapcraft merged Merged PR #4560 as 98550856e, adding initial craft-application support with fallback to Snapcraft's existing logic.
71%