← Back to issue list

Provide more meaningful output when rockcraft.yaml is invalid

View original Github issue

Metadata

Project
rockcraft
Number
#182
Type
issue
State
open
Author
arturo-seijas
Labels
—
Created
Updated
Closed
—

Current evaluation

Malformed rockcraft.yaml exposes a location-less PyYAML ScannerError. The request is reproducible but untriaged, and newer craft-application YAML handling may already cover it.

Suggested action: needs triage

Reason: The report provides an exact misindented YAML file and confirms that the raw ScannerError omits the affected location, making the UX bug straightforward to reproduce and test. However, there are no labels or substantive maintainer decisions—the comments only corrected Charmcraft versus Rockcraft—and current craft-application code already wraps YAML parse errors with filename, problem details, and resolution guidance, so its effective coverage should be verified before closure.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 21 Complexity: 22 Confidence: 80 Actionability: 88

Issue body

Hi! I've been trying to run `rockcraft pack` with a valid yaml wrongly indented: ``` name: Indico summary: Indico rocks description: Indico OCI images for the Indico charm version: "1.0" base: bare build-base: ubuntu:22.04 license: Apache-2.0 platforms: amd64: parts: indico: source: plugins plugin: python python-packages: - indico==3.2.0 ``` and I'm getting the following output: ``` Logging execution to '/home/arturo/.local/state/rockcraft/log/rockcraft-20230206-173725.594029.log' rockcraft internal error: ScannerError(None, None, 'mapping values are not allowed here', <yaml.error.Mark object at 0x7fddfe017610>) Full execution log: '/home/arturo/.local/state/rockcraft/log/rockcraft-20230206-173725.594029.log' ``` I would have expected the output to show the affected line or element. Thank you

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 21
Complexity: 22
Confidence: 80
Actionability: 88
needs triage Malformed rockcraft.yaml exposes a location-less PyYAML ScannerError. The request is reproducible but untriaged, and newer craft-application YAML handling may already cover it.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 22
Complexity: 30
Confidence: 85
Actionability: 80
keep open Issue requesting better error messages for invalid rockcraft.yaml files. Currently exposes raw PyYAML ScannerError instead of user-friendly line-specific feedback.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 30
Staleness: 70
Complexity: 25
Confidence: 75
Support Request: 10
keep open Rockcraft pack on an invalid rockcraft.yaml prints a raw pyyaml ScannerError traceback instead of a friendly message with the offending line. The underlying craft-application library now wraps YAML errors in a YamlError with problem text and mark details, so the original complaint is likely already addressed.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 80
Support Request: 10
close stale Request for improved YAML parsing error messages in rockcraft to show affected lines. Unlabelled, no maintainer response, inactive for over 3 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 25
Confidence: 80
Support Request: 10
needs triage Feature request to improve YAML parsing error messages in rockcraft, providing line numbers and context instead of raw Python scanner errors. Unlabeled and inactive for over 3 years.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.