roslyn
roslyn copied to clipboard
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
Fixes https://github.com/dotnet/roslyn/issues/50719. Note that the added test tests referencing in-memory assemblies from a script. That's not quite the same as testing single-file deployment, but I don't know a reasonable way...
This PR adds tracking for source link files and resources to the compiler's deterministic key file to ensure all compilation inputs that affect reproducible builds are properly tracked. The implementation...
Recent performance investigations indicate that Tiered Compilation (TC) may be negatively impacting throughput for Roslyn ServiceHub scenarios. While TC reduces JIT CPU time in some cases, data from VS perf...
- [x] Review current documentation on deterministic inputs - [x] Add section on debugging determinism failures with detailed steps - [x] Document using /p:Features="debug-determinism" to generate .key files - [x]...
Context: https://github.com/dotnet/roslyn/pull/81577/files?file-filters%5B%5D=.json&file-filters%5B%5D=.cs&file-filters%5B%5D=.txt&file-filters%5B%5D=.csproj#diff-5b690fb7220ca800592067b9ca959ee332ea6455223eab931c526654553aa45c The extern alias is needed to avoid conflicts between sources linked to BuildHost and Worksapace via MS.CA.Contracts.shproj. Considered using `Microsoft.CodeAnalysis.EmbeddedAttribute` but that has issues - if it's applied...
`AdditionalSourcesCollection` currently has an unordered list when adding to the compilation. We should make the order consistent so that generated compilations are fully deterministic.
#8605 pointed out that AdditionalFiles are not deterministically ordered. Production analyzers such as `SymbolIsBannedAnalyzer` are currently [doing the sorting themselves](https://github.com/dotnet/roslyn-analyzers/blob/b977a06a5bbb7203599a7e9c7bb6dae6f4cdd897/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/Core/SymbolIsBannedAnalyzer.cs#L190) to ensure deterministic diagnostics. This presumably also affects source generators...
Context: https://github.com/dotnet/roslyn/pull/57134 Had to disable deterministic key validation for `Roslyn.VisualStudio.DiagnosticsWindow.dll` because the XLF files get passed as additional files during build. Those reference resource files that have full paths in...
The following binaries are no longer building deterministically. - Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests.dll - Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.dll - Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests.dll - Microsoft.CodeAnalysis.Scripting.TestUtilities.dll - Microsoft.CodeAnalysis.Scripting.TestUtilities.dll - Microsoft.CodeAnalysis.Scripting.UnitTests.dll - Microsoft.CodeAnalysis.Scripting.UnitTests.dll - Microsoft.CodeAnalysis.VisualBasic.Scripting.Desktop.UnitTests.dll - Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests.dll The actual code contents...
I think this is an SDK bug. The workaround is either to add a specific SourceLink provider package reference (which may be redundant and may even be problematic or impossible)...