← Back to issue list

Reverse the priority for how version/grade are set for `base: core20` snaps

View original Github issue

Metadata

Project
snapcraft
Number
#4604
Type
issue
State
open
Author
dilyn-corner
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Feature request to reverse version/grade precedence for adopt-info on base: core20 snaps so part-provided values override YAML. Triaged as enhancement; maintainer said unlikely to be done before core20 is dropped, and core20 support has since been removed from the codebase.

Suggested action: close stale

Reason: The maintainer (mr-cal, 2025-05-27) explicitly said this is 'unlikely to be prioritized and completed before core20 is dropped in a major Snapcraft release.' Repo evidence confirms core20 has since been dropped (commit fa7952b4d 'chore!: drop core20 (#6019)') and snapcraft_legacy removed (ffb164b7a), so the core20-specific behavior this enhancement targets no longer exists in the codebase. The issue is no longer applicable.

Impact: 25 Quick Win: 13.75 Staleness: 85 Complexity: 45 Confidence: 80 Support Request: 10

Issue body

### What needs to get done Currently, if a `snapcraft.yaml` for a `base: core20` snap defines both a `version|grade` as well as `adopt-info`, what is defined in `version|grade` are kept: > The 'grade' and 'version' properties are specified in adopted info as well as the YAML: taking the properties from the YAML However, if a snap defines both of these and for some reason the information is *not* set by that relevant part, an error instead occurs: > Failed to generate snap metadata: 'adopt-info' refers to part 'my-part', but that part is lacking the 'parse-info' property. Given the current, behavior, I would expect a warning or a message not a failure, as the information is going to be overridden anways. I suggest: if `adopt-info` is specified and the version or grade are set in the specified part, that information should take precedent over what is set in the YAML, and if it isn't set in that part then the snap should defer to the specified `version|grade` in the YAML. ### Why it needs to get done Aside from conforming to a general UNIX-y order of precendence (invocation > user > global) where specifying e.g. a command-line flag will override an environment variable that is set, it would also be nice to have some sort of check in a part which dynamically changes the version string based on the state of the source or how the build went. For instance, it may be the case that I want the version of my snap to be `version: 11` but I set up some logic in my build system which, if some fact obtains, ACTUALLY the version and grade are changed to `11-dev` and `devel` respectively. Now I can't erroneously push what was in FACT a binary built from development-grade source to `latest/stable`, and that this snap is a dev snap is very obvious from inspecting the version string (I no longer have to refer to the source).

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 13.75
Staleness: 85
Complexity: 45
Confidence: 80
Support Request: 10
close stale Feature request to reverse version/grade precedence for adopt-info on base: core20 snaps so part-provided values override YAML. Triaged as enhancement; maintainer said unlikely to be done before core20 is dropped, and core20 support has since been removed from the codebase.
qwen/qwen3.6-35b-a3b
Staleness: 70
Complexity: 40
Confidence: 90
Support Request: 10
keep open Enhancement to prioritize adopt-info version/grade over YAML values for core20 snaps. Maintainer acknowledged it as valid but unlikely to be prioritized before core20 deprecation. Issue remains open pending resources.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 20
Confidence: 85
Support Request: 0
keep open Enhancement to reverse version/grade priority so adopt-info overrides YAML settings for core20 snaps. Triaged and acknowledged by a maintainer as a valid feature, but deprioritized pending core20 EOL.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 30
Confidence: 85
Support Request: 10
close stale Enhancement to reverse version and grade priority for core20 snaps, letting adopt-info override snapcraft.yaml values instead of the current YAML-first behavior. Triaged, acknowledged, but deprioritized due to core20 sunset. Left open pending resources.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#6019 (confidence 70%)

    PR 'chore!: drop core20' removes the core20 base support that this enhancement targets, making the requested precedence change moot.

Related issues

No related issues found above the similarity threshold.