feat: recommend Snapcraft 9.x for core22, core24, and core26 bases - #6240
feat: recommend Snapcraft 9.x for core22, core24, and core26 bases#6240rizqiamad wants to merge 2 commits into
Conversation
bff440b to
c4eeed9
Compare
mr-cal
left a comment
There was a problem hiding this comment.
Thanks, @rizqiamad!
The code itself looks good, this is just a matter of the message presentation.
| f"Base {base!r} is supported in Snapcraft 9.x. " | ||
| "It is recommended to upgrade to Snapcraft 9.x via the 'latest/stable' channel " | ||
| "to benefit from the latest bug fixes and performance improvements." |
There was a problem hiding this comment.
This is my suggestion, but let's wait for feedback from @canonical/starcraft-authors:
| f"Base {base!r} is supported in Snapcraft 9.x. " | |
| "It is recommended to upgrade to Snapcraft 9.x via the 'latest/stable' channel " | |
| "to benefit from the latest bug fixes and performance improvements." | |
| f"Snapcraft 9 is recommended for {base!r}. " | |
| "Upgrade to Snapcraft 9 for the latest bug fixes and improvements." |
There was a problem hiding this comment.
Sure! I'll wait for feedback from @canonical/starcraft-authors first.
Please let me know once there's a decision, as the test file will need
to be updated as well.
There was a problem hiding this comment.
The format looks good, with some things to consider:
- "update" might be better than "upgrade", since the latter can suggest more of a toll for the user.
- Wildcard: how would you feel about "refresh" to match the command name?
- I would go with "features and improvements".
| """Emit a warning to use Snapcraft 9.x for core22, core24, and core26 bases.""" | ||
| match base: | ||
| case "core22" | "core24" | "core26": | ||
| emit.message( |
There was a problem hiding this comment.
Can you switch this to emit.warning?
There was a problem hiding this comment.
Sure! I checked and emit.warning is available in craft-cli. I'll switch it now
Yes to the latter - we can merge the commit but either undo it with a new commit or undo as part of the merge-commit itself. I like undoing as part of the merge-commit because the history looks cleaner. |
Description
Add a warning message recommending Snapcraft 9.x when building
snaps with core22, core24, or core26 bases.
Closes #4958
make lint && make test.