Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The PublishSymbols source indexing should handle relative paths #20814

Open
danmohrmsft opened this issue Jan 29, 2025 · 0 comments
Open

The PublishSymbols source indexing should handle relative paths #20814

danmohrmsft opened this issue Jan 29, 2025 · 0 comments

Comments

@danmohrmsft
Copy link

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant