From bbff74e481aaf2c6d05949891a64c0d8ac533cf8 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Wed, 4 Dec 2024 01:37:21 -0800 Subject: [PATCH] Fix reproducibility of local builds (#76253) The `test-determinism.cmd` run was failing on my local machine. After a lot of debugging I was able to track it down to a bug in [xliff][xliff]. The full details are in the bug. The summary though is there is a race condition with how the manifest resource name is generated for RESX files when doing local builds in arcade. To work around this I'm just adding an explicit manifest resource name so that the race doesn't come into play. The race only occurs when the RESX is outside the directory cone of the project that is including it hence only needed to update this file. [xliff]: https://github.com/dotnet/arcade/issues/15296 --- .gitignore | 2 +- eng/test-determinism.ps1 | 5 ++++- .../Collections/Microsoft.CodeAnalysis.Collections.projitems | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 496f18e070dfe..a450984adaab6 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ UnitTestResults.html *.nuget.props *.nuget.targets project.lock.json -msbuild.binlog +*.binlog *.project.lock.json *_i.c diff --git a/eng/test-determinism.ps1 b/eng/test-determinism.ps1 index b695eed1bdb10..3a16cef0b11b5 100644 --- a/eng/test-determinism.ps1 +++ b/eng/test-determinism.ps1 @@ -223,7 +223,10 @@ function Test-Build([string]$rootDir, $dataMap, [string]$logFileName) { Write-Host "`tVerified $relativeDir\$fileName" } - if (-not $allGood) { + if ($allGood) { + Write-Host "Determinism check succeeded" + } + else { Write-Host "Determinism failed for the following binaries:" foreach ($name in $errorList) { Write-Host "`t$name" diff --git a/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.projitems b/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.projitems index e17523e5a7ffd..4ee9b9e4624a6 100644 --- a/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.projitems +++ b/src/Dependencies/Collections/Microsoft.CodeAnalysis.Collections.projitems @@ -65,7 +65,7 @@ - +