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

Add IsPackable to RateLimiting package and cleanup packaging TODOs #62612

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

safern
Copy link
Member

@safern safern commented Dec 10, 2021

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.

@ghost
Copy link

ghost commented Dec 10, 2021

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

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.

Author: safern
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@stephentoub stephentoub left a 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?

@safern
Copy link
Member Author

safern commented Dec 10, 2021

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]

@safern safern merged commit 4d97cda into dotnet:main Dec 10, 2021
@safern safern deleted the IsPackableRateLimiting branch December 10, 2021 20:05
@stephentoub
Copy link
Member

I believe that's what @jkotas fixed in #62617.

@safern
Copy link
Member Author

safern commented Dec 10, 2021

I believe that's what @jkotas fixed in #62617.

Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants