Fix duplicated error output#3
Open
dienhoa wants to merge 2 commits intoAnswerDotAI:mainfrom
Open
Conversation
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.
Currently, because the traceback is built from stderr, in the error case, if we only check for the existence of result.stderr like the current version does, we will print the error twice.
Note: This new approach with IOHandler doesn’t have a fine-grained execution status. So we could get an error in the future if mojo repl outputs warnings to stderr (it doesn’t seem to be the case right now). I’ve asked about it on the Mojo forum, and will update if they respond with something new: https://forum.modular.com/t/mojo-repl-warnings-and-execution-status/3024
@jph00