• J
    TLDR: artifacts are going to move around in Binaries\Debug and the directory... · b9ba3e9e
    Jared Parsons 提交于
    TLDR: artifacts are going to move around in Binaries\Debug and the directory is going to get a lot bigger.
    
    At a high level build projects can be classified into three categories based on how they write output:
    
    - incorrect: a given output path is written to more than once with different contents
    - less correct: a given output path is written to more than once but always with the same content
    - correct: a given output path is written to exactly once
    
    Today the roslyn build is decidedly “incorrect” as pretty much every file is written directly into Binaries\Debug. This means it ends up writing pretty much every Visual Studio SDK DLL twice: once for Dev14 and once for Dev15. For example at various points in the build Binaries\Debug\Microsoft.VisualStudio.Text.Data.dll may refer to Dev14 and at others it’s Dev15. If this seems like a scary proposition for a build that’s because it is indeed scary and it has real consequences. By now pretty much everyone on the team has hit the build race condition that is dragging down our PRs.
    
    The general fix here is to move build outputs into separate directories. Instead of building to $(Configuration) projects now build into say $(Configuration)\Exes\$(MSBuildProjectFileName). This will have a substantial increase in the size of Binaries. We will be looking into ways to reduce that. In the short term though build stability far outweighs the size increase.
    
    This change takes us most of the way to "correct". There are several places I had to compromise in order to get this initial change in:
    
    - UnitTests still build to a common output folder (one for Dev14, another for Dev15). Pulling unit tests apart is going to take a bit of work.
    - Every project has a <RoslynProjectType> entry. This will go away in the future for most projects. It's temporarily needed so I can fix roslyn-internal in parallel without taking down the build.
    - VSL.Imports.targets is messy. Unavoidable for now due to the above. It will get cleaner as I iterate on this.
    
    None of these are relevant to the underlying race condition. Hence it's okay to push them off.
    b9ba3e9e
Roslyn.csproj 3.4 KB