-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add IsPackable to RateLimiting package and cleanup packaging TODOs #62612
Conversation
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsWhen adding RateLimiting APIs we missed Also, the reason why this was missed was cause the Microsoft.Extensions.* packages don't set IsPackable because it was set automatically to all, but that was needed only before pkgproj infra, so also cleanup that and move IsPackable to all Extensions projects explicitly. Also, I found that we were missing to enable package baseline validation for some packages that were added in 6.0.0, so enable that, we should make that part of the new release tasks, maybe we can automate this task somehow.
|
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.
Thanks!
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.
Thanks. This looks complete, but if we made a mistake here and missed something, how would that manifest?
Good question. We would be missing publishing a package and unfortunately we don't have a way to catch that, however, I wrote a target because I thought it was worth checking when doing this change, so every missed Extensions project to set IsPackable, it would error, that's how I knew which packages I missed and add it to them. <Target Name="CheckExtensionsArePackable">
<ItemGroup>
<ExtensionsProjects Include="$(MSBuildThisFileDirectory)\Microsoft.Extensions.*\src\*.csproj" />
</ItemGroup>
<MSBuild Projects="@(ExtensionsProjects)"
Targets="ErrorIfNotPackable" />
</Target>
<Target Name="ErrorIfNotPackable">
<Error Condition="'$(IsPackable)' != 'true'" Text="Project missing IsPackable: $(MSBuildThisProjectFile)" />
</Target>
i.e ./dotnet.sh msbuild src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj /t:CheckExtensionsArePackable /bl
Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
/Users/santifdezm/repos/runtime2/.dotnet/sdk/6.0.100/MSBuild.dll -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/Users/santifdezm/repos/runtime2/.dotnet/sdk/6.0.100/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/Users/santifdezm/repos/runtime2/.dotnet/sdk/6.0.100/dotnet.dll -maxcpucount -verbosity:m /bl /t:CheckExtensionsArePackable src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj
/Users/santifdezm/repos/runtime2/src/libraries/Directory.Build.props(178,5): error : Project missing IsPackable: [/Users/santifdezm/repos/runtime2/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj] |
When adding RateLimiting APIs we missed
IsPackable
in order to generate the package.Also, the reason why this was missed was cause the Microsoft.Extensions.* packages don't set IsPackable because it was set automatically to all, but that was needed only before pkgproj infra, so also cleanup that and move IsPackable to all Extensions projects explicitly.
Also, I found that we were missing to enable package baseline validation for some packages that were added in 6.0.0, so enable that, we should make that part of the new release tasks, maybe we can automate this task somehow.