Skip to content

Unify working_set.error usage. - #12531

Merged
sholderbach merged 1 commit into
nushell:mainfrom
WindSoilder:parse_errors
Apr 16, 2024
Merged

sholderbach merged 1 commit into
nushell:mainfrom
WindSoilder:parse_errors

Conversation

@WindSoilder

Copy link
Copy Markdown
Contributor

Description

A little refactor that use working_set.error rather than working_set.parse_errors.push, which is reported here: #12238

Inconsistent error reporting. Usage of both working_set.error() and working_set.parse_errors.push(). Using ParseError::Expected for an invalid variable name when there's ParseError::VariableNotValid (from parser.rs:5237). Checking variable names manually when there's is_variable() (from parser.rs:2905).

User-Facing Changes

NaN

Tests + Formatting

Done

@sholderbach sholderbach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@sholderbach
sholderbach merged commit e6fbf7d into nushell:main Apr 16, 2024
@hustcer hustcer added this to the v0.93.0 milestone Apr 17, 2024
@WindSoilder
WindSoilder deleted the parse_errors branch May 23, 2024 03:01
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.

3 participants