-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
In order to pursue deterministic builds and to generally clean up FILE macros in binaries, we attempted to use the new Visual Studio /d1trimfile compiler switch to trim off the repository root directory. This works well enough and, instead of having an obscure ADO agent path in the file paths, e.g. C:\__w\1\s\Src\Foo.cpp, we now just have Src\Foo.cpp.
But this breaks the source indexing in the PublishSymbols ADO task because it explicitly checks the source file paths to ensure they start with the sources directory and, if not, ignores them:
azure-pipelines-tasks/Tasks/PublishSymbolsV2/IndexHelpers/SourceFileFunctions.ps1
Lines 36 to 39 in 32b9a32
| if (!$sourceFilePath.StartsWith($SourcesRootPath, [System.StringComparison]::OrdinalIgnoreCase)) { | |
| # The source file path is not under sources root. | |
| $notUnderSourcesRootPaths.Add($sourceFilePath) | |
| } else { |
Instead, it should assume that any relative path it sees should live under the sources directory, prepend the sources directory to it, test for its existence, and, if it exists, include it.