-
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
Enable the option to invoke APICompat in strict mode for ref-pack servicing #88707
Conversation
Enable strict mode comparison during servicing when `ApiCompatNetCoreAppBaselineVersion` is the current .NET version. When the GA targeting pack is released, that property should be updated which will turn on strict mode comparison and prohibits the addition of new API. Suppressing one error in the baseline file that showed-up because out-of-band assemblies now being passed in as assembly references. While at it I also cleaned-up how private assemblies are handled during the build.
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsEnable strict mode comparison during servicing when Suppressing one error in the baseline file that showed-up because out-of-band assemblies now being passed in as assembly references. While at it I also cleaned-up how private assemblies are handled during the build.
|
<!-- In servicing, the live targeting pack is compared against the GA version in strict mode, without a suppression file. --> | ||
<PropertyGroup Condition="'$(DotNetFinalVersionKind)' == 'servicing' and '$(ApiCompatNetCoreAppBaselineVersion)' == '$(NetCoreAppCurrentVersion)'"> | ||
<ApiCompatEnableStrictMode>true</ApiCompatEnableStrictMode> | ||
<ApiCompatNetCoreAppLatestStableBaselineFile /> | ||
</PropertyGroup> |
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.
It might be useful to change the condition here to be Condition="'$(DotNetFinalVersionKind)' == 'servicing'"
and use that as the forcing function to make sure we update ApiCompatNetCoreAppBaselineVersion
? Or do we have a doc somewhere that has all of the steps to do to make sure that the version gets updated?
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.
Agreed. Pushed a commit that changes the condition. I also just noticed that with dotnet/sdk@a3303b6, unnecessary suppressions will be flagged which is another good forcing function to update the baseline.
@carlossanlop has a servicing doc. We need to add the following to it:
When changing the repository into servicing mode, the following needs to happen for APICompat:
- Update the
ApiCompatNetCoreAppBaselineVersion
property and point it to the latest available targeting pack version (the closest one to the GA version). Adjust theApiCompatNetCoreAppBaselineTFM
property as well (i.e. when switching from7.0.0
to8.0.0-rc2....
, the TFM changes fromnet7.0
tonet8.0
). - APICompat will then complain about unnecessary suppressions in the baseline files. Remove all unnecessary files / entries from the suppression files.
With that, introducing a new API or breaking change in servicing is now guarded against.
Fixes #42961
Enable strict mode comparison during servicing when
ApiCompatNetCoreAppBaselineVersion
is the current .NET version. When the GA targeting pack is released, that property should be updated which will turn on strict mode comparison and prohibits the addition of new API.Suppressing one error in the baseline file that showed-up because out-of-band assemblies now being passed in as assembly references.
While at it I also cleaned-up how private assemblies are handled during the build.