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

Wrong error line separators in console build #4516

Closed
auduchinok opened this issue Mar 14, 2018 · 6 comments
Closed

Wrong error line separators in console build #4516

auduchinok opened this issue Mar 14, 2018 · 6 comments

Comments

@auduchinok
Copy link
Member

auduchinok commented Mar 14, 2018

It happens consistently across different OS and terminal/console clients with either corrupted symbols or no new line in build outputs.

screen shot 2017-07-18 at 19 06 54

screen shot 2017-07-18 at 19 09 43

@vasily-kirichenko found this code that looks related:
https://github.com/Microsoft/visualfsharp/blob/51dac00d62a7f6f6fb714f4cef6cb3912abf58df/src/fsharp/ErrorLogger.fs#L611-L614

@auduchinok
Copy link
Member Author

Related Rider issue:

image
screen shot 2017-07-18 at 19 12 29

@vasily-kirichenko
Copy link
Contributor

The code that looks responsible for this is

// Code below is for --flaterrors flag that is only used by the IDE

let stringThatIsAProxyForANewlineInFlatErrors = new System.String [|char 29 |]

let NewlineifyErrorString (message:string) = message.Replace(stringThatIsAProxyForANewlineInFlatErrors, Environment.NewLine)

@dsyme
Copy link
Contributor

dsyme commented Mar 14, 2018

@auduchinok This is by design I believe - the Fsc task sets --flaterrors and has done for at least a couple of years, I think more https://github.com/Microsoft/visualfsharp/blame/master/src/fsharp/FSharp.Build/Fsc.fs#L220

I think you're meant to de-flatten them if you want multi-line in the IDE, search around the VF# code

@dsyme
Copy link
Contributor

dsyme commented Mar 14, 2018

I'll close this since it's by deign

@dsyme dsyme closed this as completed Mar 14, 2018
@auduchinok
Copy link
Member Author

@dsyme What about console builds? I don't think it's OK to have wrong line separators when you build without an IDE.

@dsyme
Copy link
Contributor

dsyme commented Mar 14, 2018

@auduchinok I know, I used to think that and it used to work like that in 2006 but the decision was otherwise. I think it's because too many build-output processing tools want single-line error output. I don't think we should change it now unless it's changed inadvertently somewhere along the way (I don't think it has, but I may be wrong)

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

No branches or pull requests

3 participants