Repository navigation
Conversation
Member
Author
|
curious to see if @cptpiepmatz and @sholderbach have thoughts about direction |
2 tasks done
Member
|
This sadly never left draft status. And sorry for not looking into this 😭 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the iteration type of
ListStreamfromValuetoResult<Value, ShellError>. Currently, the only way to express errors within aListStreamis to put them into aValue::Error, which causes errors to get stuck inside of streams, resulting in lots of confusing situations. #16738 improved this situation by making it an error to collect streams with errors, but this PR takes this a step further by making it possible to return actualShellErrors in theListStreamiterator. These can then be properly handled by the consumer of theListStreamiterator.This PR also opens up a path towards removing
Value::Erroraltogether, if that is a direction we are interested in going.This is a currently a draft PR, the core implementation of the
ListStreamand related functions has already been changed (nu-protocolandnu-engineboth compile already), but almost every place whereListStreamis iterated over directly needs to be modified to unwrap theResults.The
PipelineData::mapfunction still retains the same signature (Value -> Value). There is also a newPipelineData::try_mapfunction (Value -> Result<Value, ShellError>), which will let us replace anyPipelineData::mapinvocation which constructs aValue::Errorwith aPipelineData::try_mapinvocation which can return a properShellError.Release notes summary - What our users need to know
TODO