From 8399c9f3f95973d1b81be8ab6599535e152a5f26 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Mon, 12 Oct 2020 11:07:18 -0700
Subject: [PATCH] !!! Correct condition controlling `public` API analysis !!!
(#26797)
* !!! Correct condition controlling `public` API analysis !!!
- #26785 demonstrated analyzers were inoperable
* Remove unused `public` API files
* Update `public` API files
- three Components files were missing `#nullable enable`
- `nullable` annotations missing or out-of-date elsewhere
* Ignore `public` API files completely during source build
- do not warn about unused files
* Update more `public` API files
---
eng/targets/CSharp.Common.targets | 10 ++---
.../Components/src/PublicAPI.Unshipped.txt | 43 ++++++++++---------
.../Server/src/PublicAPI.Unshipped.txt | 18 +++++++-
.../Web/src/PublicAPI.Unshipped.txt | 18 ++++----
.../src/PublicAPI.Unshipped.txt | 2 +-
.../src/PublicAPI.Shipped.txt | 1 -
.../src/PublicAPI.Unshipped.txt | 1 -
.../src/PublicAPI.Unshipped.txt | 2 +-
.../Http.Features/src/PublicAPI.Unshipped.txt | 10 ++---
src/Http/Routing/src/PublicAPI.Unshipped.txt | 2 +-
.../src/PublicAPI.Unshipped.txt | 10 ++---
.../Diagnostics/src/PublicAPI.Unshipped.txt | 2 +
src/Mvc/Mvc.Core/src/PublicAPI.Unshipped.txt | 1 +
.../src/PublicAPI.Unshipped.txt | 1 +
src/ObjectPool/src/PublicAPI.Unshipped.txt | 8 ++--
.../Core/src/PublicAPI.Unshipped.txt | 22 +++++-----
.../Negotiate/src/PublicAPI.Unshipped.txt | 6 +++
.../server/Core/src/PublicAPI.Unshipped.txt | 18 ++++----
18 files changed, 100 insertions(+), 75 deletions(-)
delete mode 100644 src/FileProviders/Manifest.MSBuildTask/src/PublicAPI.Shipped.txt
delete mode 100644 src/FileProviders/Manifest.MSBuildTask/src/PublicAPI.Unshipped.txt
diff --git a/eng/targets/CSharp.Common.targets b/eng/targets/CSharp.Common.targets
index c9ef556f4d..babdae75f2 100644
--- a/eng/targets/CSharp.Common.targets
+++ b/eng/targets/CSharp.Common.targets
@@ -18,18 +18,18 @@
$(NoWarn);CA1416
-
+ !('$(IsImplementationProject)' == 'true' AND
+ ! $(RepoRelativeProjectDir.Contains('Tools'))) ">
diff --git a/src/Components/Components/src/PublicAPI.Unshipped.txt b/src/Components/Components/src/PublicAPI.Unshipped.txt
index bccbaa73c3..95903170d0 100644
--- a/src/Components/Components/src/PublicAPI.Unshipped.txt
+++ b/src/Components/Components/src/PublicAPI.Unshipped.txt
@@ -1,3 +1,4 @@
+#nullable enable
Microsoft.AspNetCore.Components.BindConverter
Microsoft.AspNetCore.Components.BindElementAttribute
Microsoft.AspNetCore.Components.BindElementAttribute.BindElementAttribute(string! element, string? suffix, string! valueAttribute, string! changeAttribute) -> void
@@ -46,12 +47,12 @@ Microsoft.AspNetCore.Components.EventCallback
Microsoft.AspNetCore.Components.EventCallback.EventCallback(Microsoft.AspNetCore.Components.IHandleEvent? receiver, System.MulticastDelegate? delegate) -> void
Microsoft.AspNetCore.Components.EventCallback.HasDelegate.get -> bool
Microsoft.AspNetCore.Components.EventCallback.InvokeAsync() -> System.Threading.Tasks.Task!
-Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(object! arg) -> System.Threading.Tasks.Task!
+Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(object? arg) -> System.Threading.Tasks.Task!
Microsoft.AspNetCore.Components.EventCallback
Microsoft.AspNetCore.Components.EventCallback.EventCallback(Microsoft.AspNetCore.Components.IHandleEvent? receiver, System.MulticastDelegate? delegate) -> void
Microsoft.AspNetCore.Components.EventCallback.HasDelegate.get -> bool
Microsoft.AspNetCore.Components.EventCallback.InvokeAsync() -> System.Threading.Tasks.Task!
-Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(TValue arg) -> System.Threading.Tasks.Task!
+Microsoft.AspNetCore.Components.EventCallback.InvokeAsync(TValue? arg) -> System.Threading.Tasks.Task!
Microsoft.AspNetCore.Components.EventCallbackFactory
Microsoft.AspNetCore.Components.EventCallbackFactory.Create(object! receiver, Microsoft.AspNetCore.Components.EventCallback callback) -> Microsoft.AspNetCore.Components.EventCallback
Microsoft.AspNetCore.Components.EventCallbackFactory.Create(object! receiver, System.Action! callback) -> Microsoft.AspNetCore.Components.EventCallback
@@ -145,7 +146,7 @@ Microsoft.AspNetCore.Components.ParameterView.Enumerator
Microsoft.AspNetCore.Components.ParameterView.Enumerator.Current.get -> Microsoft.AspNetCore.Components.ParameterValue
Microsoft.AspNetCore.Components.ParameterView.Enumerator.MoveNext() -> bool
Microsoft.AspNetCore.Components.ParameterView.GetEnumerator() -> Microsoft.AspNetCore.Components.ParameterView.Enumerator
-Microsoft.AspNetCore.Components.ParameterView.GetValueOrDefault(string! parameterName) -> TValue
+Microsoft.AspNetCore.Components.ParameterView.GetValueOrDefault(string! parameterName) -> TValue?
Microsoft.AspNetCore.Components.ParameterView.GetValueOrDefault(string! parameterName, TValue defaultValue) -> TValue
Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(object! target) -> void
Microsoft.AspNetCore.Components.ParameterView.ToDictionary() -> System.Collections.Generic.IReadOnlyDictionary!
@@ -190,30 +191,13 @@ Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType.UpdateMarkup = 8 -
Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType.UpdateText = 5 -> Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType
Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame
Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame.AttributeEventHandlerId.get -> ulong
-Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddAttribute(int sequence, string! name, string? value) -> void
-Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddComponentReferenceCapture(int sequence, System.Action