← Back to issue list

Hooks stanza doesn't match parts and apps

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1877448
Type
issue
State
open
Author
~ted
Labels
Created
Updated
Closed

Current evaluation

Feature request proposing a syntax change to the hooks stanza in snapcraft.yaml to use named hooks instead of trigger-based keys, for consistency with parts/apps. Open 6+ years with zero comments, no labels, and no maintainer interaction.

Suggested action: needs triage

Reason: The issue has zero comments, no labels, no assignee, and no maintainer response in over 6 years (2307 days). The current Hook model in snapcraft/models/project.py still uses the trigger-based format (hooks.$trigger with command_chain, plugs, etc.), confirming the inconsistency described is still present. A maintainer needs to decide whether to acknowledge, reject, or close this design suggestion.

Impact: 15 Quick Win: 5.25 Staleness: 95 Complexity: 65 Confidence: 75 Support Request: 25

Issue body

Working on adding some font hooks for the Inkscape package it was my first time using hooks, and I found it kinda confusing. I think this largely stemmed from the fact that the hooks section works differently than the parts and apps sections. The hooks section is abstractly like this: hooks.$trigger.$parameter Where apps and parts are mostly like this: apps.$name.$parameter I think that the $name attribute is useful for organization and allows for more flexible hooks. For instance I'd suggest what is now: hooks:   configure:     plugs: [ desktop ] Would look more like this: hooks:   update-font-cache:     trigger: [ configure ]     command: update-font-cache.sh     plugs: [ desktop ] This would allow for better organization and documentation of hooks. Of course this would require some translation as snapd expects the original format. But that could be achieved with Snapcraft building a shell script for each trigger calling the appropriate hooks.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 5.25
Staleness: 95
Complexity: 65
Confidence: 75
Support Request: 25
needs triage Feature request proposing a syntax change to the hooks stanza in snapcraft.yaml to use named hooks instead of trigger-based keys, for consistency with parts/apps. Open 6+ years with zero comments, no labels, and no maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Feature request proposing a syntax change for Snapcraft's hooks stanza. Submitted over six years ago with zero maintainer interaction or comments, it remains unassessed and inactive.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 70
Confidence: 85
Support Request: 10
close stale Proposal to restructure Snapcraft hooks stanza to use a named attribute with a trigger field, aligning it with parts and apps. Unlabelled, zero comments, inactive for over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 70
Confidence: 85
Support Request: 10
close stale Six-year-old design proposal suggesting a YAML schema change for Snapcraft hooks to align with parts/apps. Zero maintainer feedback or discussion. Proposal is obsolete given project evolution.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 65
Confidence: 80
Support Request: 10
close stale Suggests restructuring the hooks stanza syntax to match parts/apps sections for better organization. Unlabelled, zero comments, inactive for 6 years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.