Skip to content

Convert ShellError::UnsupportedInput to named fields - #10971

Merged
sholderbach merged 3 commits into
nushell:mainfrom
drbrain:shellerror-unsupported-input-fields
Nov 7, 2023
Merged

sholderbach merged 3 commits into
nushell:mainfrom
drbrain:shellerror-unsupported-input-fields

Conversation

@drbrain

@drbrain drbrain commented Nov 6, 2023

Copy link
Copy Markdown
Contributor

Description

This is easy to do with rust-analyzer, but I didn't want to just pump these all out without feedback.

Part of #10700

User-Facing Changes

None

Tests + Formatting

  • 🟢 toolkit fmt
  • 🟢 toolkit clippy
  • 🟢 toolkit test
  • 🟢 toolkit test stdlib

After Submitting

N/A

This is easy to do with rust-analyzer, but I didn't want to just pump
these all out without feedback.

Part of nushell#10700
@sholderbach

Copy link
Copy Markdown
Member

I love to see it. Based on a quick scroll I don't think we lose any relevant comments (which RA sadly doesn't preserve) I only saw some that point out the fields which become obsolete or referring to Span handling for Value::Errorwhich is not relevant anymore after this variant also got its own Span.

We could workshop the exact label names but changing them later wouldn't be much of a hassle.

Comment thread crates/nu-protocol/src/shell_error.rs Resolved
This better aligns how the error is displayed with how it is used.

Co-authored-by: Stefan Holderbach <[email protected]>

@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 for taking the time to do this and breaking it up in digestible chunks!

Appreciated that you pick up a part of this effort!

@sholderbach
sholderbach merged commit 7a3cbf4 into nushell:main Nov 7, 2023
@drbrain
drbrain deleted the shellerror-unsupported-input-fields branch November 7, 2023 22:26
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
# Description

This is easy to do with rust-analyzer, but I didn't want to just pump
these all out without feedback.

Part of nushell#10700

# User-Facing Changes

None

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A

---------

Co-authored-by: Stefan Holderbach <[email protected]>
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this pull request Feb 20, 2024
# Description

This is easy to do with rust-analyzer, but I didn't want to just pump
these all out without feedback.

Part of nushell#10700

# User-Facing Changes

None

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

N/A

---------

Co-authored-by: Stefan Holderbach <[email protected]>
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.

2 participants