← Back to issue list

Migrate snapcraft_legacy subcommands to use craft-cli

View original Github issue

Metadata

Project
snapcraft
Number
#4194
Type
issue
State
closed
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Abandoned. The maintainer rejected the proposed approach, confirming the legacy CLI handler will remain in use short-term while commands are fully migrated out of snapcraft_legacy in the medium term.

Suggested action:

No scores available.

Issue body

### What needs to get done Here's what I understand: Rather than passing the cli context from `craft-cli` to `snapcraft_legacy`'s cli handler, snapcraft should directly call functions in `snapcraft_legacy`. In other words, `snapcraft_legacy`'s cli handler should be bypassed. I think @sergiusens mentioned he did this for [`list-extensions`](https://github.com/snapcore/snapcraft/blob/40136ea9b59351e4f9f1fbed8c4d8c0db873c488/snapcraft/commands/extensions.py#L38). ### Why it needs to get done This needs to get done to improve the user experience. `snapcraft <subcommand> --help` lists `--verbosity` but using this argument when building a core20 snap or using snapcraft_legacy subcommand raises an error. There are a few reports about this. [[1](https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/2020891)] [[2](https://bugs.launchpad.net/snapcraft/+bug/2016662)] [[3](https://forum.snapcraft.io/t/very-confusing-verbosity-and-verbose-behavior-depends-on-base-in-snapcraft-7/35433)]

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Abandoned. The maintainer rejected the proposed approach, confirming the legacy CLI handler will remain in use short-term while commands are fully migrated out of snapcraft_legacy in the medium term.
qwen/qwen3.6-35b-a3b The craft-cli migration was rejected. The issue was closed, with the maintainer confirming the team will continue using the legacy CLI handler short-term while planning a full command migration out of snapcraft_legacy long-term.
qwen/qwen3.6-35b-a3b Rejected. Maintainer declined bypassing legacy CLI handler. Project will continue using it short-term, planning to migrate commands entirely out of snapcraft_legacy medium-term.
qwen3.6-35b-a3b-mtp-q6 The proposed migration approach was rejected. The team will continue using the legacy CLI handler short-term, planning to migrate commands entirely out of snapcraft_legacy in the medium term.
qwen3.6-35b-a3b-mtp-q6 Rejected. The team will continue calling the legacy CLI handler short-term. Medium-term plans involve migrating commands entirely out of snapcraft_legacy rather than bypassing its handler.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5338 Migrate snapcraft_legacy store commands snapcraft closed Partially completed. Migrated upload-metadata and set-default-track to modern snapcraft code. Promote and metrics commands deferred to a separate effort. Issue closed.
74%
#5982 Trim down snapcraft_legacy and plan migration effort snapcraft closed Closed by author mr-cal. Abandoned in favor of a revised migration strategy: moving store commands out of snapcraft_legacy first, then deleting the module entirely. A Jira ticket was created for tracking.
74%
#3616 cli: create new snapcraft entry point (CRAFT-729) snapcraft merged Merged a new snapcraft CLI entry point that currently invokes the legacy implementation. This establishes the foundation for future routing logic between new and legacy code paths.
73%
#1793261 Vendor legacy snapcraft to maintain backward compatibility snapcraft (launchpad) closed Closed without implementation. The proposal to vendor legacy snapcraft for backward compatibility was abandoned or superseded by newer architecture, receiving no further discussion or action.
71%
#3608 many: rename snapcraft package to snapcraft_legacy (CRAFT-726) snapcraft merged Merged after renaming the snapcraft package to snapcraft_legacy to make room for a new craft libraries-based application. Approved, passed CI, and modified 557 files. The application entry point remains unchanged and will be handled separately.
70%