Enable the option to invoke APICompat in strict mode for ref-pack servicing#88707
Enable the option to invoke APICompat in strict mode for ref-pack servicing#88707ViktorHofer merged 2 commits intomainfrom
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.
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.
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
ApiCompatNetCoreAppBaselineVersionproperty and point it to the latest available targeting pack version (the closest one to the GA version). Adjust theApiCompatNetCoreAppBaselineTFMproperty as well (i.e. when switching from7.0.0to8.0.0-rc2...., the TFM changes fromnet7.0tonet8.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
ApiCompatNetCoreAppBaselineVersionis 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.