Skip to content

Conversation

@m-redding
Copy link
Member

No description provided.

@m-redding m-redding changed the title draft clean up aot script so it can be run locally draf update AOT pipeline to no longer require ci parameters Nov 7, 2025
@m-redding m-redding changed the title draf update AOT pipeline to no longer require ci parameters draft update AOT pipeline to no longer require ci parameters Nov 7, 2025
@@ -1,15 +1,49 @@
param(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you intend to keep this as a script as opposed to moving it into the azsdk cli?

If we do keep it as a script we should consider changing the args to take a package path instead of a service directory and package name.

}
Write-Host "Running Check-AOT-Compatibility.ps1 for Package: $($package.ArtifactName) Service $($package.ServiceDirectory)"

$scriptPath = Join-Path $PSScriptRoot "Check-AOT-Compatibility.ps1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a place we should consider switching to call the azsdk cli command instead of calling the script directly.


dotnet msbuild `
/nologo `
/t:GetAotCompatOptOut `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a custom target to get properties any longer. See https://learn.microsoft.com/en-us/visualstudio/msbuild/evaluate-items-and-properties?view=vs-2022

dotnet msbuild -getProperty:AotCompatOptOut

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah thanks so much, I was trying to figure that out but wasn't finding what I needed

<EnableSourceLink Condition="'$(EnableSourceLink)' == ''">true</EnableSourceLink>
<DefineConstants Condition="'$(BuildSnippets)' == 'true'">$(DefineConstants);SNIPPET</DefineConstants>
<AotCompatOptOut>false</AotCompatOptOut>
<AotAnalyzersOptOut>false</AotAnalyzersOptOut>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we condition these with IsShippingLibrary?

<WriteLinesToFile File="$(OutputProjectFilePath)" Lines="@(_WriteToLines)" />
</Target>

<Target Name="GetAotCompatOptOut">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other comment but this shouldn't be needed. We probably should clean-up the other similar cases now as well.

exit 0
}

$filteredPackages = Get-ChildItem -Path $PackageInfoFolder -Filter "*.json" -File `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My hope is that we can eliminate the need for this "PR" script completely. I would like to see us compute the list of changed projects in one place (which we have I believe already) and just do a simple loop over inline and call the azsdk cli for each.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants