← Back to issue list

`snapcraft try` error is outdated

View original Github issue

Metadata

Project
snapcraft
Number
#6186
Type
issue
State
closed
Author
mr-cal
Labels
good first issue Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Fixed by merged PR #6193 (commit bcae1c3ed): snapcraft try now reports the effective project base, with core24 and core26 test coverage.

Resolution: closed resolved

Reason: The change makes TryCommand use project.get_effective_base() and adds parametrized unit coverage for core24 and core26. PR #6193 was merged, resolving #6186 in commit bcae1c3ed.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Check existing issues - [x] I've verified that this request isn't described by any existing issues. ### Request Fix the error message for `snapcraft try`, which always displays "core24", even if you are trying it with core26: `Command or feature not implemented: "snapcraft try" is not implemented for core24` This can be reproduced with the following snapcraft.yaml: ```yaml name: hello-core26 base: core26 build-base: devel version: "0.1" summary: hello description: hello grade: devel confinement: strict parts: my-part: plugin: nil ``` This should include a unit test that uses pytest.mark.paramterize for core24 and core26. ### The problem it solves A better error message for core26 snaps.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #6193 (commit bcae1c3ed): snapcraft try now reports the effective project base, with core24 and core26 test coverage.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #6193 in commit bcae1c3ed: snapcraft try now reports the project's effective base, including core26, with core24 and core26 tests.
stealth/space-bunny-alpha — closed resolved Fixed in merged PR #6193: snapcraft try now reports the project's effective base, with core24 and core26 unit coverage.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #6193 (commit bcae1c3): `snapcraft try` now reports the effective project base, with core24 and core26 test coverage.
qwen/qwen3.6-35b-a3b — — Closed after assignment. Maintainer provided implementation guidance using get_effective_base() for dynamic base detection, with parametrized tests planned for core24 and core26.
qwen/qwen3.6-35b-a3b — — Closed after being assigned to a contributor to fix the outdated error message and add parametrized unit tests.
qwen/qwen3.6-35b-a3b — — Closed after assignment to vedantdaterao. Contributor clarified base resolution logic using get_effective_base() and fixed the outdated error message.
qwen3.6-35b-a3b-mtp-q6 — — Closed and assigned to a contributor to fix the hardcoded core24 in the snapcraft try error message by dynamically detecting the actual base. A parametrized unit test was requested.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#6193 (confidence 100%)

    Merged PR directly fixes the outdated base in the snapcraft try error message.

Related issues

Issue Project State Summary Similarity
#6193 fix: snapcraft try error shows effective base snapcraft merged Merged PR #6193 fixed `snapcraft try` to report the project's effective base via `get_effective_base()`, with core24 and core26 test coverage, in commit bcae1c3ed.
87%
#5604 `snapcraft try` for `core24` snapcraft open Core24 `snapcraft try` support remains unimplemented; current code explicitly raises FeatureNotImplemented. Maintainers confirmed it is now feasible after Craft Application 5.0 refactoring.
76%
#1978844 snapcraft try not available for core22-based snap snapcraft (launchpad) closed Core22 support for snapcraft try was merged in canonical/snapcraft#3981 (commit 2691262b8) and released on the edge channel.
75%
#1116 Changed "snappy try" to "snap try" snapcraft closed Rename PR #1116 was closed unmerged in 2017 after inactivity; later PR #2524 merged the Snapcraft try command in commit ec579eaa1.
74%
#6187 Fix snapcraft try error to show actual base snapcraft closed Closed unmerged over contribution-guideline concerns; PR #6193 later fixed #6186 by using the effective project base in commit bcae1c3ed.
74%
#6224 fix(test): correct match string in try test snapcraft merged Merged PR #6224 in commit 78ef8569b, correcting the snapcraft try test match string after #6193 changed the effective-base output.
74%
#4958 Recommend using newer versions of snapcraft snapcraft open Enhancement to emit a warning recommending a newer Snapcraft for older bases; rescoped by maintainer to 8.x recommending 9.x for core22/core24/core26, contributor assigned, open PR #6240 stalled with failing CI.
71%
#4118 init: use core22 base for `snapcraft init` snapcraft merged Merged PR #4118 (mr-cal, CRAFT-1670): snapcraft init now scaffolds core22 as the default base instead of core20, with the command moved from snapcraft_legacy/ to snapcraft/ and a spread test added. Squash-merged as 4afc9e4c9.
71%
#6450 fix(test): error for core22 snaps snapcraft closed PR #6450 proposed an early core22 error for snapcraft test, but was closed unmerged with review pending; #5479 remains open.
70%