Skip to content

Move to stable Microsoft.CodeAnalysis.PublicApiAnalyzers version #25662

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

Merged
merged 1 commit into from
Sep 6, 2020

Conversation

dougbu
Copy link
Contributor

@dougbu dougbu commented Sep 6, 2020

No description provided.

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Sep 6, 2020
@dougbu dougbu requested a review from a team September 6, 2020 21:20
@dougbu dougbu added the tell-mode Indicates a PR which is being merged during tell-mode label Sep 6, 2020
<ItemGroup Condition=" '$(IsImplementationProject)' == 'true' AND

<ItemGroup Condition=" Exists('$(MSBuildProjectDirectory)\PublicAPI.*.txt') AND
'$(IsImplementationProject)' == 'true' AND
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New version emits errors if Public API baseline files are missing

Copy link
Member

Choose a reason for hiding this comment

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

Nice - would be good to revert this once we can fix all the occurrences.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. If we undid this change and eliminated analyzers and msbuild tasks, we'd know for sure the public API is covered. Might need to invent a special ImNotPubliclyConsumable flag for Microsoft.Web.Xdt.Extensions and other special cases😺

First, we need to be able to analyze projects containing *.cshtml or *.razor files:

  • Microsoft.AspNetCore.Authentication.AzureAD.UI
  • Microsoft.AspNetCore.Authentication.AzureADB2C.UI
  • Microsoft.AspNetCore.Components.Authorization
  • Microsoft.AspNetCore.Identity.UI

Do we have an issue tracking this problem❔ /cc @sharwell @mavasani

Copy link
Member

Choose a reason for hiding this comment

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

dotnet/roslyn#47350 is tracking it, but it might need to be fixed in aspnetcore.

<AdditionalFiles Include="PublicAPI.Shipped.txt"
Condition=" Exists('$(MSBuildProjectDirectory)\$(_TFMDirectory)\PublicAPI.Shipped.txt') " />
<AdditionalFiles Include="PublicAPI.Unshipped.txt"
Condition=" Exists('$(MSBuildProjectDirectory)\$(_TFMDirectory)\PublicAPI.Unshipped.txt') " />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in the .targets file for the package now

!('$(IsImplementationProject)' == 'true' AND
'$(DotNetBuildFromSource)' != 'true' AND
! $(RepoRelativeProjectDir.Contains('Tools'))) ">
<Warning Text="Public API baseline files ignored." />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just in case 😺

<ItemGroup Condition=" '$(IsImplementationProject)' == 'true' AND

<ItemGroup Condition=" Exists('$(MSBuildProjectDirectory)\PublicAPI.*.txt') AND
'$(IsImplementationProject)' == 'true' AND
Copy link
Member

Choose a reason for hiding this comment

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

Nice - would be good to revert this once we can fix all the occurrences.

@dougbu dougbu merged commit e02820f into release/5.0-rc2 Sep 6, 2020
@dougbu dougbu deleted the dougbu/update.public.api.package branch September 6, 2020 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants