Conversation
|
The bug mentioned an alternate solution strategy, which was "replace the mode at the end of the build". Did you consider and discard that? Is this a better option? |
|
I was the one who first noticed the VT100 issue because I use cmd for most things. I typically believe the simplest solution that resolves the problem is the best solution, as it is least likely to have hidden bugs, and this simplifies the code rather than potentially leaving some issue open with a build that fails to reset the mode after some unusual sequence of events. I tested that this did not reintroduce the issue I'd seen by building something with the bootstrapped MSBuild.exe. If the problem remains resolved, and the code is simpler, I think it is the best solution. |
rokonec
left a comment
There was a problem hiding this comment.
Looks legit. What was the intent behind disabling it originally?
As I recall, I found code that claimed to resolve the VT100 issue. I put it into MSBuild and tried testing it, and it seemed to work properly whether or not that parameter was present. Since whoever wrote the snippet I'd found online seemed to think it was important, I figured there was some case I hadn't tested where it would be useful, so I left it in. |
|
Does leaving |
|
For clarity, is your concern that it converted But cc @baronfel for a proper opinion. |
|
Yes, that's the concern. It's possible that it's explicitly outputting that for Reasons, but I would say my concern runs the other way: if you run it with |
|
Correct - @rainersigwald has the scenario nailed here. MSBuild should return the state to whatever it was before invoking MSBuild. Other applications shouldn't have to alter their behavior based on whether or not they were run after MSBuild in a |
|
Ok, that's more reasonable than wanting random codes in your output. I'd suggest that's perpendicular to this change, as this change is specifically for newline and (in my opinion) should happen regardless. I can try to put something together to resolve that issue as well. |

Fixes #8008
Context
With the MSBuild server, I added support for VT100, which meant we could understand colorization and such from an older command prompt, but I also added DISABLE_NEWLINE_AUTO_RETURN, which made the UI look worse.
Customer Impact
Customers using MSBuild server and trying to print newlines (
\n) will see output with extra space.Testing
Manually tested the change: ran the proposed repro project and saw the bug. Overwrote the MSBuild in that SDK with custom bits from this PR and retested it, and I could no longer reproduce the issue. Tried using MSBuild.exe on a random project, and the important part of the VT100 change was preserved.
Code Reviewers
rokonec
Description of fix
Removed the DISABLE_NEWLINE_AUTO_RETURN argument