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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Out/Error streams chunking in Fsi tool window #998

Merged
merged 2 commits into from
Mar 7, 2016
Merged

Fix Out/Error streams chunking in Fsi tool window #998

merged 2 commits into from
Mar 7, 2016

Conversation

OmarTawfik
Copy link
Contributor

Fixes #864
The issue is that chunking the output streams (standard output and error) was done in order:

Index Type Line
1 error System.DivideByZeroException: Attempted to divide by zero.
2 out >
3 error at <StartupCode$FSI_0077>.$FSI_0077.main@()
4 error Stopped due to error

Per the previous chunking function, this produced chunks of [(1), (2), (3,4)], and the following output (notice that the prompt is after the first line):

System.DivideByZeroException: Attempted to divide by zero.
>   at <StartupCode$FSI_0077>.$FSI_0077.main@()
Stopped due to error

The new chunking function groups across lines, producing chunks of [(1,3,4), (2)], and the following output (the prompt is now separate from error lines):

System.DivideByZeroException: Attempted to divide by zero.
    at <StartupCode$FSI_0077>.$FSI_0077.main@()
Stopped due to error
>

@dsyme @abelbraaksma @Microsoft/fsharp-compiler

| (key, v)::rest when equal key k -> accumulate k (v::chunk) rest acc
| rest -> loop rest ((k, (List.rev chunk))::acc)
loop kxs []
let rec chunkKeyValues allEntries =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it rec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KevinRansom no. Refactoring miss. I'll change it now. Thanks for noticing.

OmarTawfik pushed a commit that referenced this pull request Mar 7, 2016
Fix Out/Error streams chunking in Fsi tool window
@OmarTawfik OmarTawfik merged commit 22ba027 into dotnet:master Mar 7, 2016
@OmarTawfik OmarTawfik deleted the bug864 branch March 7, 2016 22:00
@enricosada
Copy link
Contributor

@dsyme maybe that was the issue with err/out stream redirection on test suite?

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.

4 participants