Skip to content

fix: add missing label to MissingField error in script parser#2233

Open
Hassnaa9 wants to merge 1 commit intoprefix-dev:mainfrom
Hassnaa9:fix/improve-script-partial-error-labels
Open

fix: add missing label to MissingField error in script parser#2233
Hassnaa9 wants to merge 1 commit intoprefix-dev:mainfrom
Hassnaa9:fix/improve-script-partial-error-labels

Conversation

@Hassnaa9
Copy link

Continues the work started in #398 and #805 to improve _partialerror!
diagnostic messages throughout the codebase.

This PR adds a missing label to the MissingField error in
src/recipe/parser/script.rs, making it clearer to users which required
field is absent when parsing a recipe script section.

Fixes #399

@Hassnaa9
Copy link
Author

@swarnimarun Can you review this when you have time please?

*self.span(),
ErrorKind::MissingField(Cow::Owned(name.to_owned()))
ErrorKind::MissingField(Cow::Owned(name.to_owned())),
label = format!("required field `{}` is missing", name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this message a lot better than what we're currently seeing?

@wolfv
Copy link
Member

wolfv commented Mar 6, 2026

Can you show the improvement e.g. with a screenshot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve partialerror messages/labels

2 participants