Skip to content

feat: recommend Snapcraft 9.x for core22, core24, and core26 bases - #6240

Open
rizqiamad wants to merge 2 commits into
canonical:hotfix/8.14from
rizqiamad:feat/recommend-snapcraft-9x
Open

feat: recommend Snapcraft 9.x for core22, core24, and core26 bases#6240
rizqiamad wants to merge 2 commits into
canonical:hotfix/8.14from
rizqiamad:feat/recommend-snapcraft-9x

Conversation

@rizqiamad

@rizqiamad rizqiamad commented May 6, 2026

Copy link
Copy Markdown

Description

Add a warning message recommending Snapcraft 9.x when building
snaps with core22, core24, or core26 bases.

Closes #4958

  • I've followed the contribution guidelines.
  • I've signed the CLA.
  • I've successfully run make lint && make test.
  • I've added or updated any relevant documentation.
  • In documents I changed, I added a meta description if one was missing.
  • I've updated the relevant release notes.

@rizqiamad
rizqiamad requested review from bepri and mr-cal as code owners May 6, 2026 03:40
@rizqiamad
rizqiamad force-pushed the feat/recommend-snapcraft-9x branch from bff440b to c4eeed9 Compare May 6, 2026 03:48

@mr-cal mr-cal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @rizqiamad!

The code itself looks good, this is just a matter of the message presentation.

Comment thread snapcraft/application.py
Comment on lines +92 to +94
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."

@mr-cal mr-cal May 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my suggestion, but let's wait for feedback from @canonical/starcraft-authors:

Suggested change
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."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment thread snapcraft/application.py Outdated
"""Emit a warning to use Snapcraft 9.x for core22, core24, and core26 bases."""
match base:
case "core22" | "core24" | "core26":
emit.message(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you switch this to emit.warning?

@rizqiamad rizqiamad May 7, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I checked and emit.warning is available in craft-cli. I'll switch it now

@mr-cal
mr-cal requested a review from a team May 7, 2026 15:55

@bepri bepri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming @mr-cal's feedback is taken, I'm happy with the code as well, so I'll go ahead and approve now :)

@mr-cal Just out of curiosity, this doesn't get merged back into main right? Or does the commit go in and we just add another commit to remove it again?

@mr-cal

mr-cal commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Assuming @mr-cal's feedback is taken, I'm happy with the code as well, so I'll go ahead and approve now :)

@mr-cal Just out of curiosity, this doesn't get merged back into main right? Or does the commit go in and we just add another commit to remove it again?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants