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
19.02k stars 4.03k forks source link

Incremental builds are broken in Roslyn.sln. #74154

Open CyrusNajmabadi opened 4 months ago

CyrusNajmabadi commented 4 months ago

Using:

image

Repro steps.

  1. Build Roslyn.sln.
  2. Build Roslyn.sln again

First time succeeds with:

WARNING: Potential build performance issue in 'IntegrationTestBuildProject.csproj'. The project does not appear up-to-date after a successful build: Output 'D:\github\roslyn\artifacts\bin\IntegrationTestBuildProject\Debug\net45\IntegrationTestBuildProject.dll' does not exist, not up-to-date. See https://aka.ms/incremental-build-failure.
========== Rebuild All: 207 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 2:10 PM and took 03:20.100 minutes ==========

Second time causes roslyn to rebuild 30 projects, even though nothing has changed:

...
30>PrepareTests -> D:\github\roslyn\artifacts\bin\PrepareTests\Debug\net8.0\PrepareTests.dll
30>RunTests -> D:\github\roslyn\artifacts\bin\RunTests\Debug\net8.0\RunTests.dll
30>VisualStudio.SetupPackage -> D:\github\roslyn\artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.x64\Debug\net472\Microsoft.CodeAnalysis.Compilers.x64.vsix
30>VisualStudio.SetupPackage -> D:\github\roslyn\artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.x86\Debug\net472\Microsoft.CodeAnalysis.Compilers.x86.vsix
30>Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests\Debug\net8.0\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.dll
30>VisualStudio.SetupPackage -> D:\github\roslyn\artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.arm64\Debug\net472\Microsoft.CodeAnalysis.Compilers.arm64.vsix
30>Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests\Debug\net472\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.dll
arunchndr commented 3 months ago

I believe this was already fixed by Sam in arcade and needs to flow down.