Skip to content

Convert remainder of ShellError variants to named fields#11276

Merged
fdncred merged 13 commits intonushell:mainfrom
drbrain:shellerror-fields-3
Dec 10, 2023
Merged

Convert remainder of ShellError variants to named fields#11276
fdncred merged 13 commits intonushell:mainfrom
drbrain:shellerror-fields-3

Conversation

@drbrain
Copy link
Copy Markdown
Contributor

@drbrain drbrain commented Dec 9, 2023

Description

Removed variants that are no longer in use:

  • NoFile*
  • UnexpectedAbbrComponent

Converted:

  • OutsideSpannedLabeledError
  • EvalBlockWithInput
  • Break
  • Continue
  • Return
  • NotAConstant
  • NotAConstCommand
  • NotAConstHelp
  • InvalidGlobPattern
  • ErrorExpandingGlob

Fixes #10700

User-Facing Changes

None

Tests + Formatting

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

After Submitting

N/A

@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Dec 10, 2023

Nice work on all this tech debt @drbrain! We really appreciate you and your work here.

@fdncred fdncred merged commit 3e5f81a into nushell:main Dec 10, 2023
@drbrain drbrain deleted the shellerror-fields-3 branch December 10, 2023 01:52
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
# Description

Removed variants that are no longer in use:
* `NoFile*`
* `UnexpectedAbbrComponent`

Converted:
* `OutsideSpannedLabeledError`
* `EvalBlockWithInput`
* `Break`
* `Continue`
* `Return`
* `NotAConstant`
* `NotAConstCommand`
* `NotAConstHelp`
* `InvalidGlobPattern`
* `ErrorExpandingGlob`

Fixes nushell#10700 

# User-Facing Changes

None

# Tests + Formatting

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

# After Submitting

N/A
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this pull request Feb 20, 2024
# Description

Removed variants that are no longer in use:
* `NoFile*`
* `UnexpectedAbbrComponent`

Converted:
* `OutsideSpannedLabeledError`
* `EvalBlockWithInput`
* `Break`
* `Continue`
* `Return`
* `NotAConstant`
* `NotAConstCommand`
* `NotAConstHelp`
* `InvalidGlobPattern`
* `ErrorExpandingGlob`

Fixes nushell#10700 

# User-Facing Changes

None

# Tests + Formatting

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

# After Submitting

N/A
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.

Make ShellError more readable by consistently using named fields

2 participants