← Back to issue list

Treat the gadget.yaml like other snap meta files

View original Github issue

Metadata

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

Current evaluation

Enhancement to move gadget.yaml source location from project root to snap/gadget.yaml for consistency with other snap meta files. Triaged, acknowledged by maintainer who linked it to issue #4892 as a prerequisite. Code still reads from root; not yet implemented.

Suggested action: keep open

Reason: The issue is triaged (labeled 'Status: Triaged') and explicitly acknowledged by maintainer @mr-cal who stated 'When we implement #4892, we should implement this as well,' establishing a clear dependency. Code inspection confirms gadget.yaml is still read from project_dir root in both setup_assets.py and package.py, so the feature remains unimplemented. Last activity was 207 days ago (just over 6 months), within the moderately-stale range, and the issue is scoped to a specific, valid enhancement.

Impact: 35 Quick Win: 15.75 Staleness: 55 Complexity: 55 Confidence: 72 Support Request: 10

Issue body

### What needs to get done The `gadget.yaml` should be required to be located in `snap/gadget.yaml` of the snap project directory instead of in the root of the project directory. This should not interfere with the `gadget.yaml` being migrated to its final location in `${SNAP}/meta/gadget.yaml`. ### Why it needs to get done Currently, the `gadget.yaml` for a gadget snap must be located in the root of the project directory. The `snapcraft.yaml` was previously also located in the root of the project directory, but was migrated to `snap/snapcraft.yaml`. Likewise, hooks are in `snap/hooks/`, and are moved (in some relevant way) to `${SNAP}/meta/hooks/` at the end of the build. For continuity, it would be make sense to require that the `gadget.yaml` be located in `snap/gadget.yaml`. This would ensure uniformity in the way `snapcraft` treats all snap-related meta information.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 15.75
Staleness: 55
Complexity: 55
Confidence: 72
Support Request: 10
keep open Enhancement to move gadget.yaml source location from project root to snap/gadget.yaml for consistency with other snap meta files. Triaged, acknowledged by maintainer who linked it to issue #4892 as a prerequisite. Code still reads from root; not yet implemented.
qwen/qwen3.6-35b-a3b
Staleness: 60
Complexity: 50
Confidence: 85
Support Request: 5
keep open Enhancement to relocate gadget.yaml to snap/gadget.yaml for consistency with other snap metadata. Triaged and linked to related issue #4892, awaiting implementation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 30
Confidence: 85
Support Request: 5
keep open Enhancement to require gadget.yaml in snap/gadget.yaml for consistency with other snap metadata. Triaged and linked to related work, awaiting implementation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 30
Confidence: 85
Support Request: 10
keep open Relocate gadget.yaml from the project root to snap/gadget.yaml to match other snap metadata paths. Currently triaged and tracked as CRAFT-3264. Implementation is pending alongside PR #4892, with multi-arch support suggested.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/snapcraft#4892 (confidence 55%)

    Maintainer @mr-cal explicitly stated 'When we implement #4892, we should implement this as well.' However, the tool returned #4892 as a merged PR about Launchpad credentials, which does not match the context — the referenced issue may be a different tracking item or the tool result is inaccurate.

Related issues

Issue Project State Summary Similarity
#258 Support using gadget.yaml volumes as a source for imagecraft.yaml volume definitions imagecraft open Enhancement to let imagecraft.yaml import volumes from the gadget snap's meta/gadget.yaml instead of duplicating the layout. Triaged and discussed; a maintainer noted snapd reads the gadget directly, so overrides risk a disconnect. No work planned this cycle.
71%