-
Notifications
You must be signed in to change notification settings - Fork 322
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
Print unique set of PDBs to a text file #4332
base: main
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines failed to run 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
{ | ||
Write-Host $value | ||
} | ||
New-Item "$(ob_outputDirectory)\pdbs.txt" -Force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is 'ob'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor suggestions
$pdbSet = @{} | ||
$inputPath = "$(Build.ArtifactStagingDirectory)\symbols" | ||
Get-ChildItem *.pdb -Path $inputPath -Recurse | foreach-object { | ||
$pdbSet[$_.Name] = $true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're using hashset as a dynamically growable collection? Since you don't care about the value $null
would be slightly prefereable to $true
Write-Host $value | ||
} | ||
New-Item "$(ob_outputDirectory)\pdbs.txt" -Force | ||
$pdbSet.Keys | Out-File "$(ob_outputDirectory)\pdbs.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can replace lines 164-165 with the simpler
$pdbSet.Keys | Set-Content -Path "$(ob_outputDirectory)\pdbs.txt" -Force
You can also control encoding if need be (see other Set-Content uses across the repo for examples)
A microsoft employee must use /azp run to validate using the pipelines below.
WARNING:
Comments made by azure-pipelines bot maybe inaccurate.
Please see pipeline link to verify that the build is being ran.
For status checks on the main branch, please use TransportPackage-Foundation-PR
(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary)
and run the build against your PR branch with the default parameters.