← Back to issue list

Error message for invalid versions is misleading

View original Github issue

Metadata

Project
rockcraft
Number
#429
Type
issue
State
closed
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Fixed in commit 7955ba06 by replacing the name-specific validation error with an accurate message for invalid version values.

Resolution: closed resolved

Reason: Closed as resolved by commit 7955ba06, which corrected the validation text so it no longer applies the ROCK-name restriction to the version field. The issue record identifies this commit as the fix.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The error message when a project has an invalid value for the `version` field is misleading. It says "Invalid name for ROCK (must contain only lowercase letters, numbers and hyphens) in field 'version'", but that restriction is for the `name` field. ### To Reproduce Create a rockcraft.yaml with `version: invalid_version` ### Environment rockcraft 1.0.1 ### rockcraft.yaml ```shell name: hello title: Hello World summary: An Hello World ROCK description: | This is just an example of a Rockcraft project for a Hello World ROCK. version: invalid_version base: bare build-base: ubuntu@22.04 license: Apache-2.0 platforms: amd64: parts: hello: plugin: nil ``` ### Relevant log output ```shell Bad rockcraft.yaml content: - Invalid name for ROCK (must contain only lowercase letters, numbers and hyphens) in field 'version' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in commit 7955ba06 by replacing the name-specific validation error with an accurate message for invalid version values.
stealth/space-bunny-alpha — closed resolved Fixed the misleading invalid-version error in commit 7955ba06, replacing name-specific wording with the correct validation message.
qwen/qwen3.6-35b-a3b — — Closed without resolution details. The misleading validation error for the version field was reported but no fix or follow-up was documented.
qwen/qwen3.6-35b-a3b — — Reported misleading validation error for invalid version fields. Closed without comments or documented resolution, indicating the issue was abandoned.
qwen/qwen3.6-35b-a3b — — Abandoned without a fix. The report detailed a misleading validation error for invalid version fields in rockcraft.yaml that incorrectly cited name field rules.
qwen3.6-35b-a3b-mtp-q6 — — Closed. The error message for invalid version fields was corrected to accurately reference the version field instead of the name field.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: rockcraft#7955ba06 (confidence 100%)

    Commit 7955ba06 contains the correction for the misleading invalid-version error.

Related issues

Issue Project State Summary Similarity
#2497 Improved error message for 'version' specific cases (type error and bad length) snapcraft merged Merged PR #2497 in commit 6daaf2804, improving validation errors for non-string version values and versions with invalid lengths.
74%