Update csc.json#97
Conversation
Console logger output was changed, so updated the regular expression to match the new output.
Fixed escape characters
| "pattern": [ | ||
| { | ||
| "regexp": "^([^\\s].*)\\((\\d+)(?:,\\d+|,\\d+,\\d+)?\\):\\s+(error|warning)\\s+([a-zA-Z]+(?<!MSB)\\d+):\\s*(.*?)\\s+\\[(.*?)\\]$", | ||
| "regexp": "^([^\\s].*)\\((\\d+)(?:,\\d+|,\\d+,\\d+)?\\):\\s+(error|warning)\\s+([a-zA-Z]+(?<!MSB)\\d+):\\s*(.*?)\\s+\\[([^\\s]+)[\\s\\W\\dA-z].*\\]$", |
There was a problem hiding this comment.
I'm not sure we can assume that the path to the project file doesn't contain whitepace--it's generally legal for it to do so. Should we separate based on a different character, or can this be rewritten to work backwards from the end to a space instead?
There was a problem hiding this comment.
A file path can't contain < so I could use that character before the properties are printed out to separate the file path and the properties
There was a problem hiding this comment.
I changed it so the output should follow below. I think this actually makes it a bit more clearer as well as to the separation between the properties and the file path S:\msbuild\src\Build\Evaluation\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\msbuild\src\Build\Microsoft.Build.csproj > Properties:prop]
There was a problem hiding this comment.
The new pattern leaves the space between the file name and the greater-than-sign which might mess with the problem matching
There was a problem hiding this comment.
Right. I'll take that space out of the new pattern
There was a problem hiding this comment.
I hope no one ever does this, but < and almost any other character can be used in filenames on linux.
We changed the console logger's output to separate the outputted properties and the file path with a ">" symbol.
|
/cc @ericsciple |
|
I updated the script causing the test failure and added a smoke test for the pattern matching. Can you merge the latest from master into your branch to retest? |
…arExpressionChanges
Changed symbol to ::
ZEisinger
left a comment
There was a problem hiding this comment.
Updated again after the powershell script fell behind again. Looks good now. Please merge when ready.
|
Hey folks, MSBuild/SDK maintainer here. We didn't get this into the .NET 5.0 SDK and aren't quite sure when it will go in. I think it's best to close this PR for now and we'll pick it up again at some point in the future. Sorry for the delayed decision! |
I'm proposing a change in MSBuild's console output format (dotnet/msbuild#5414) that
will add additional information to errors/warnings from projects that have multiple
TargetFrameworks. This updates the problem matcher to handle the new format.S:\msbuild\src\Build\Evaluation\ExpressionShredder.cs(33,7): error CS1003: Syntax error, ',' expected [S:\msbuild\src\Build\Microsoft.Build.csproj TargetFramework:netcore3.0]