← Back to issue list

feat(application): merge commands within groups

View original Github issue

Metadata

Project
craft-application
Number
#545
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged in craft-application 4.4.0 via commit f6187001, enabling application commands to replace same-named defaults while preserving command-group ordering.

Resolution: closed resolved

Reason: PR #545 was merged as commit f6187001. The 4.4.0 changelog confirms that command-group ordering is preserved and applications can override commands defined by craft-application within the same group.

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`? ----- Allows Snapcraft to override default commands like the `InitCommand` and `PackCommand` without a hacky override ([source](https://github.com/canonical/snapcraft/pull/5129/files#r1813199559)). ### Features - Applications can add a command to a `CommandGroup` where craft-application already provides a default command with the same name. The application's command will replace the default command. ### Changes - `CommandGroup.ordered` is no longer discarded. - The Lifecycle CommandGroup is ordered. - If an application registers multiple CommandGroups with the same group name, they will not be merged. - I'm OK with this change because it is an odd thing to do, no applications do it, and I would consider it an incorrect way to use craft application. (CRAFT-3543)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in craft-application 4.4.0 via commit f6187001, enabling application commands to replace same-named defaults while preserving command-group ordering.
stealth/space-bunny-alpha — closed resolved PR #545 by mr-cal merged as commit f6187001, letting application-defined commands replace same-named default commands in a CommandGroup, preserving CommandGroup.ordered and making the Lifecycle group ordered (CRAFT-3543).
stealth/space-bunny-alpha — closed resolved Merged craft-application PR #545, enabling application-defined commands to replace default commands with the same name in a group while preserving command order.
qwen/qwen3.6-35b-a3b — — Merged. Allows applications to override default commands in CommandGroups by replacing them. CommandGroups are now ordered, and duplicate group names are not merged.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.