-
Notifications
You must be signed in to change notification settings - Fork 78
Controlling the task output #165
Description
Last night I was looking into the possibility of moving dotnet/roslyn to using the GitLink MSBuild task. Previously we were using the command line tool as a post build step. That works but had a couple of issues we were hoping the task would resolve. Most notable: performance and completeness.
Using the build task appears to fix the performance issues we were seeing with the command line tool. However it has another problem that is blocking adoption. Whenever it finds a file in the PDB that it can't find in the Git tree it will issue an MSBuild warning and dump output to the console.
This blocks adoption in roslyn because we build with /TreatWarningsAsErrors and have a couple of patterns that GitLink can't handle. The patterns are:
- XAML: pretty much every XAML file in our repo results in a GitLink "file not found" warning.
#linedirectives: these are done for self hosting a number of compiler features. As a result though the PDB has a couple of lies about missing files in it.
The XAML problem may be solvable but likely not the #line directive. The PDB is deliberately lying to GitLink here so not much for GitLink to do.
Been thinking about this over the evening. Wondering if we could get an option to tell GitLink to not warn on missing files. That should be off by default but for cases like Roslyn, where we know we're going to lie a bit, we could turn it on for the projects where it happens. Something along the lines of
<GitLinkWarnOnMissingFiles>false</GitLinkWarnOnMissingFiles>Example of the XAML missing file warning:
VisualStudioDiagnosticsWindow -> E:\code\roslyn\Binaries\Debug\Vsix\VisualStudioDiagnosticsWindow\Roslyn.VisualStudio.DiagnosticsWindow.vsix
E:\code\gitlink\output\debug\GitLinkTask\GitLink.targets(9,5): error : Unable to find file in git: "e:\code\roslyn\binaries\obj\csharpvisualstudio\debug\options\formatting\options\formatting\formattingoptionpagecontrol.xaml". [E:\code\roslyn\src\VisualStudio\CSharp\Impl\CSharpVisualStudio.csproj]
E:\code\gitlink\output\debug\GitLinkTask\GitLink.targets(9,5): error : Unable to find file in git: "e:\code\roslyn\binaries\obj\csharpvisualstudio\debug\options\options\advancedoptionpagecontrol.xaml". [E:\code\roslyn\src\VisualStudio\CSharp\Impl\CSharpVisualStudio.csproj]