Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace panics with errors in thread spawning #12040

Merged
merged 1 commit into from Mar 2, 2024

Conversation

devyn
Copy link
Contributor

@devyn devyn commented Mar 1, 2024

Description

Replace panics with errors in thread spawning.

Also adds IntoSpanned trait for easily constructing Spanned, and an implementation of From<Spanned<std::io::Error>> for ShellError, which is used to provide context for the error wherever there was a span conveniently available. In general this should make it more convenient to do the right thing with std::io::Error and always add a span to it when it's possible to do so.

User-Facing Changes

Fewer panics!

Tests + Formatting

  • 馃煝 toolkit fmt
  • 馃煝 toolkit clippy
  • 馃煝 toolkit test
  • 馃煝 toolkit test stdlib

Also adds `IntoSpanned` trait for easily constructing `Spanned`, and an
implementation of `From<Spanned<std::io::Error>>` for `ShellError`,
which is used to provide context for the error wherever there was a span
conveniently available. In general this should make it more convenient
to do the right thing with `std::io::Error` and always add a span to it
when it's possible to do so.
@fdncred fdncred merged commit 626d597 into nushell:main Mar 2, 2024
19 checks passed
@fdncred
Copy link
Collaborator

fdncred commented Mar 2, 2024

thanks

@devyn devyn deleted the cleanup-thread-spawn-expects branch March 2, 2024 18:45
@hustcer hustcer added this to the v0.91.0 milestone Mar 4, 2024
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.

None yet

3 participants