← Back to issue list

Generated 'git describe' based version strings can exceed 32 character version limit

View original Launchpad issue

Metadata

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

Current evaluation

2018 bug report: version: git can generate git-describe strings exceeding snapcraft's 32-character limit (e.g. 38 chars). No maintainer activity in ~6.7 years. The version: git feature has since been deprecated in favor of version-script/craftctl set version.

Suggested action: close stale

Reason: The issue is inactive for ~6.7 years with zero comments and no maintainer engagement, and it is no longer applicable: the related closed issue #1812633 documents that 'version: git' was deprecated in favor of version-script:/craftctl set version=... specifically to avoid version strings exceeding snapd's 32-character limit, so the root cause no longer exists in current snapcraft. Closing as stale with a pointer to the replacement mechanism is appropriate.

Impact: 20 Quick Win: 14.0 Staleness: 90 Complexity: 30 Confidence: 70 Support Request: 10

Issue body

When building a snap using the 'version: git' snapcraft.yaml parameter, it is possible for snapcraft to generate a version string longer than its own 32 character limit. For example, a snap built from a forked branch of the upstream 'develop-2019-10-23' branch, with some dirty commits, produces the below error: error: cannot validate snap "matrix-appservice-irc": invalid snap version "develop-2019-10-23+git10.fb1f3b2-dirty": cannot be longer than 32 characters (got: 38) The snap in question can be cloned from https://github.com/devec0/matrix-appservice-irc/tree/add-snapcraft and built if you have trouble reproducing this behaviour.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14.0
Staleness: 90
Complexity: 30
Confidence: 70
Support Request: 10
close stale 2018 bug report: version: git can generate git-describe strings exceeding snapcraft's 32-character limit (e.g. 38 chars). No maintainer activity in ~6.7 years. The version: git feature has since been deprecated in favor of version-script/craftctl set version.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 70
Support Request: 5
close stale Untriaged bug report from 2018 where git describe version strings exceed snapcraft's 32-character limit. No maintainer response or activity in over six years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 75
Support Request: 5
close stale Snapcraft generates git describe version strings exceeding its 32-character limit, causing build validation errors. The issue remains open with no maintainer response or labels after over six years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 5
close stale snapcraft's git describe version generation can exceed the 32-character snap version limit, causing build failures. Reported with a reproducible example, but has been inactive for over 6 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 25
Confidence: 85
Support Request: 5
close stale Snapcraft's git describe version generation can exceed the 32-character limit, causing build failures. The report has been inactive for over 6 years with no maintainer response or updates.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft (launchpad)#1812633 (confidence 75%)

    Closed issue documenting that 'version: git' was deprecated in favor of version-script:/craftctl set version=... to prevent version strings exceeding the 32-character limit — the same failure mode reported here.

Related issues

Issue Project State Summary Similarity
#1812633 "version: git" can produce version strings too long for snapd snapcraft (launchpad) closed The version: git feature was deprecated in favor of craftctl set version=... to prevent excessively long version strings exceeding snapd's 32-character limit. Users should use version-script: or the new control command instead.
82%
#1769519 Setting the snapcraft.yaml version field to 'git' produces undocumented and broken magic snapcraft (launchpad) open Snapcraft 2.42 (2018): setting version: git in snapcraft.yaml substitutes a mangled git describe output; tags with invalid chars (e.g. underscore) yield an invalid version that snap refuses to install, with no error. No maintainer interaction in 8+ years.
74%