Skip to content

Commit 911112e

Browse files
authored
Fix overaggressive BuildSnippets (Azure#48980)
* buildsnippets was running very aggressively. this PR should resolve it * CheckAOT was working properly by defaulting to off unless true, but that was accidental instead of intentional
1 parent 0200a8e commit 911112e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

eng/scripts/Build-Snippets.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ Set-StrictMode -Version 4
1818
$TargetProjects = $ProjectNames -split ","
1919
$RepoRoot = Resolve-Path (Join-Path "$PSScriptRoot" ".." "..")
2020

21-
$snippetEnabledProjects = Get-ChildItem -Recurse "$PackageInfoFolder" *.json `
21+
$snippetEnabledProjects = (Get-ChildItem -Recurse "$PackageInfoFolder" *.json `
2222
| Foreach-Object { Get-Content -Raw -Path $_.FullName | ConvertFrom-Json } `
2323
| Where-Object { $_.ArtifactName -in $TargetProjects -and $_.CIParameters.BuildSnippets -eq $true }
24+
| ForEach-Object { $_.ArtifactName }) -join ","
2425

25-
$scopedFile = Write-PkgInfoToDependencyGroupFile -OutputPath "$RepoRoot" -PackageInfoFolder $PackageInfoFolder -ProjectNames $TargetProjects
26+
$scopedFile = Write-PkgInfoToDependencyGroupFile -OutputPath "$RepoRoot" -PackageInfoFolder $PackageInfoFolder -ProjectNames $snippetEnabledProjects
2627

2728
Write-Host "Writing project list to $scopedFile"
2829
Write-Host (Get-Content -Raw -Path $scopedFile)

eng/scripts/Language-Settings.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function Get-AllPackageInfoFromRepo($serviceDirectory)
121121
if ($ciProps) {
122122
# CheckAOTCompat is opt _in_, so we should default to false if not specified
123123
$shouldAot = GetValueSafelyFrom-Yaml $ciProps.ParsedYml @("extends", "parameters", "CheckAOTCompat")
124-
if ($shouldAot) {
124+
if ($null -ne $shouldAot) {
125125
$parsedBool = $null
126126
if ([bool]::TryParse($shouldAot, [ref]$parsedBool)) {
127127
$pkgProp.CIParameters["CheckAOTCompat"] = $parsedBool

0 commit comments

Comments
 (0)