dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.92k stars 4.02k forks source link

Compiler code generators fail unexpectedly #20294

Open jcouv opened 7 years ago

jcouv commented 7 years ago

I was making a change to BoundNodes.xml. Initially, I had made a bad change, so the generator would fail on that (which is expected). But after sorting that part out, I still go an error generating C# syntax. Re-running the tool then passed that stage and failed on VB syntax. Re-running the tool succeeded.

FYI @jaredpar

D:\repos\roslyn>build\scripts\generate-compiler-code.cmd
Using existing NuGet.exe at version 4.1.0
Building CompilersBoundTreeGenerator
Building CSharpErrorFactsGenerator
Building CSharpSyntaxGenerator
Command failed to execute: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\\MSBuild\15.0\bin\msbuild.exe /t:Publish /p:Configuration=Debug /p:RuntimeIdentifier=win7-x64 /v:m CSharpSyntaxGenerator\CSharpSyntaxGenerator.csproj
D:\repos\roslyn>build\scripts\generate-compiler-code.cmd
Using existing NuGet.exe at version 4.1.0
Building CompilersBoundTreeGenerator
Building CSharpErrorFactsGenerator
Building CSharpSyntaxGenerator
Building VisualBasicErrorFactsGenerator
Building VisualBasicSyntaxGenerator
Command failed to execute: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\\MSBuild\15.0\bin\msbuild.exe /t:Publish /p:Configuration=Debug /p:RuntimeIdentifier=win7-x64 /v:m VisualBasicSyntaxGenerator\VisualBasicSyntaxGenerator.vbproj
D:\repos\roslyn>build\scripts\generate-compiler-code.cmd
Using existing NuGet.exe at version 4.1.0
Building CompilersBoundTreeGenerator
Building CSharpErrorFactsGenerator
Building CSharpSyntaxGenerator
Building VisualBasicErrorFactsGenerator
Building VisualBasicSyntaxGenerator
Running CSharpSyntaxGenerator.exe
Running CSharpSyntaxGenerator.exe
Running BoundTreeGenerator.exe
Running CSharpErrorFactsGenerator.exe
Running VBSyntaxGenerator.exe
Running VBSyntaxGenerator.exe
Running BoundTreeGenerator.exe
Running VBErrorFactsGenerator.exe
Running VBSyntaxGenerator.exe
jaredpar commented 7 years ago

Do you have the change to BoundNodes.xml that was causing the problem?

jcouv commented 7 years ago

Yes I added an IsUsed field to deconstruction operator. But initially I had type as bool instead of Boolean. After I fixed that issue is when I got errors generating other files. But those errors disappeared without any further changes.