← Back to issue list

cli: refactor re-execution into legacy

View original Github issue

Metadata

Project
snapcraft
Number
#2571
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged CLI refactor moving re-execution into legacy mode. Introduces a custom click.Command class to detect legacy invocation and adds skeletons for remote parts, search, update, and define. Approved after manual testing and CI checks.

Suggested action:

No scores available.

Issue body

This refactor makes it easy to still use the old commands regardless of the existence of a base in the project and to use the store related commands from non-legacy regardless of where this is run from. To achieve this, a new class command inherited from click.Command was created that can detect if invocation of the legacy code base is required. Simple skeletons to handle remote parts, search, update and define, were created that simply execute into the legacy snapcraft. Signed-off-by: Sergio Schvezov <sergio.schvezov@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 CLI refactor moving re-execution into legacy mode. Introduces a custom click.Command class to detect legacy invocation and adds skeletons for remote parts, search, update, and define. Approved after manual testing and CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged a CLI refactor routing legacy execution via a click.Command subclass. Legacy commands run regardless of project base configuration. Validated via unit tests and manual
qwen3.6-35b-a3b-mtp-q6 Merged a CLI refactor routing legacy commands via a custom click.Command subclass. Maintains backward compatibility with legacy snapcraft regardless of project base. Approved after manual and unit testing.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3919 cli: move remote build out of legacy snapcraft merged Merged into main as PR #3919. Moved CLI remote build logic out of legacy, exported --build-for, hidden --build-on, and fixed emitter stopping during prompts. Approved and passed CI checks.
71%