Skip to content

Commit

Permalink
Fix API Baseline on develop (ChilliCream#3889)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-tengler authored Jun 28, 2021
1 parent 08e578d commit 19a3dfd
Show file tree
Hide file tree
Showing 43 changed files with 144 additions and 107 deletions.
24 changes: 14 additions & 10 deletions .build/Build.PublicApiAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ partial class Build : NukeBuild
.DependsOn(Restore)
.Executes(() =>
{
if (!InvokedTargets.Contains(Restore))
{
DotNetBuildSonarSolution(AllSolutionFile);
}
DotNetBuildSonarSolution(AllSolutionFile);

DotNetBuild(c => c
.SetProjectFile(AllSolutionFile)
Expand All @@ -40,15 +37,11 @@ partial class Build : NukeBuild
.SetProperty("RequireDocumentationOfPublicApiChanges", true));
});

Target AddUnshipped => _ => _
Target AddUnshippedApi => _ => _
.DependsOn(Restore)
.Executes(() =>
{
// first we ensure that the All.sln exists.
if (!InvokedTargets.Contains(Restore))
{
DotNetBuildSonarSolution(AllSolutionFile);
}
DotNetBuildSonarSolution(AllSolutionFile);

// new we restore our local dotnet tools including dotnet-format
DotNetToolRestore(c => c.SetProcessWorkingDirectory(RootDirectory));
Expand Down Expand Up @@ -122,6 +115,17 @@ partial class Build : NukeBuild
Target MarkApiShipped => _ => _
.Executes(async () =>
{
Colorful.Console.WriteLine("This is only supposed to be executed after a release has been published.", Color.Yellow);
Colorful.Console.WriteLine("If you just want to stage your API changes, use the AddUnshippedApi script.", Color.Yellow);
Colorful.Console.WriteLine("Continue? (y/n)", Color.Yellow);

if (Colorful.Console.ReadKey().Key != ConsoleKey.Y)
{
return;
}

Colorful.Console.WriteLine();

var shippedFiles = Directory.GetFiles(SourceDirectory, _shippedApiFile, SearchOption.AllDirectories);

foreach (var shippedFile in shippedFiles)
Expand Down
4 changes: 2 additions & 2 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"items": {
"type": "string",
"enum": [
"AddUnshipped",
"AddUnshippedApi",
"CheckPublicApi",
"Clean",
"Compile",
Expand Down Expand Up @@ -121,7 +121,7 @@
"items": {
"type": "string",
"enum": [
"AddUnshipped",
"AddUnshippedApi",
"CheckPublicApi",
"Clean",
"Compile",
Expand Down
6 changes: 3 additions & 3 deletions API-Baselines.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ It can be resolved by adding the new symbol to the `PublicAPI.Unshipped.txt` fil
Microsoft.AspNetCore.Builder.NewApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!
```

This change can be performed automatically by your IDE or using a [script](#AddUnshipped).
This change can be performed automatically by your IDE or using a [script](#AddUnshippedApi).

> Note: Be sure to apply the Code-Fix on a solution level, if there are many new APIs that need to be documented.
> ![image](https://user-images.githubusercontent.com/45513122/119241399-47bbbe80-bb56-11eb-9253-92e2878cd428.png)
Expand Down Expand Up @@ -113,12 +113,12 @@ Executes a build and fails if there are undocumented changes.
./build.sh CheckPublicApi
```

### AddUnshipped
### AddUnshippedApi

This will use the `dotnet-format` tool to fix all the `RS0016` warnings of the `Microsoft.CodeAnalysis.PublicApiAnalyzers`.

```bash
./build.sh AddUnshipped
./build.sh AddUnshippedApi
```

### DiffShippedApi
Expand Down
1 change: 0 additions & 1 deletion src/GreenDonut/src/Core/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
Empty file.
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
#nullable enable
**Removed**HotChocolate.AspNetCore.Subscriptions.Messages.DataStartMessageHandler.DataStartMessageHandler(HotChocolate.Execution.IRequestExecutor! requestExecutor, HotChocolate.AspNetCore.ISocketSessionInterceptor! socketSessionInterceptor, HotChocolate.Execution.Instrumentation.IDiagnosticEvents! diagnosticEvents) -> void
HotChocolate.AspNetCore.Subscriptions.Messages.DataStartMessageHandler.DataStartMessageHandler(HotChocolate.Execution.IRequestExecutor! requestExecutor, HotChocolate.AspNetCore.ISocketSessionInterceptor! socketSessionInterceptor, HotChocolate.IErrorHandler! errorHandler, HotChocolate.Execution.Instrumentation.IDiagnosticEvents! diagnosticEvents) -> void
14 changes: 7 additions & 7 deletions src/HotChocolate/Core/src/Abstractions/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@
~const HotChocolate.WellKnownDirectives.Stream = "stream" -> string
~HotChocolate.DataLoaderAttribute.DataLoaderAttribute(string key) -> void
~HotChocolate.DataLoaderAttribute.Key.get -> string
HotChocolate.Execution.IExecutionTaskContext.ReportError(HotChocolate.Execution.IExecutionTask! task, HotChocolate.IError! error) -> void
HotChocolate.Execution.IExecutionTaskContext.ReportError(HotChocolate.Execution.IExecutionTask! task, System.Exception! exception) -> void
HotChocolate.Execution.IExecutionTaskContext.Track(HotChocolate.Execution.IExecutionTask! task) -> System.IDisposable!
~HotChocolate.Execution.IExecutionTaskContext.ReportError(HotChocolate.Execution.IExecutionTask task, HotChocolate.IError error) -> void
~HotChocolate.Execution.IExecutionTaskContext.ReportError(HotChocolate.Execution.IExecutionTask task, System.Exception exception) -> void
~HotChocolate.Execution.IExecutionTaskContext.Track(HotChocolate.Execution.IExecutionTask task) -> System.IDisposable
~HotChocolate.Execution.IExecutionTaskDefinition.Create(HotChocolate.Execution.IExecutionTaskContext context) -> HotChocolate.Execution.IExecutionTask
HotChocolate.Execution.IQuery.ToString() -> string!
HotChocolate.Execution.IQuery.WriteTo(System.IO.Stream! output) -> void
HotChocolate.Execution.IQuery.WriteToAsync(System.IO.Stream! output, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
HotChocolate.Execution.IQuery.WriteToAsync(System.IO.Stream! output) -> System.Threading.Tasks.Task!
~HotChocolate.Execution.IQuery.ToString() -> string
~HotChocolate.Execution.IQuery.WriteTo(System.IO.Stream output) -> void
~HotChocolate.Execution.IQuery.WriteToAsync(System.IO.Stream output, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task
~HotChocolate.Execution.IQuery.WriteToAsync(System.IO.Stream output) -> System.Threading.Tasks.Task
~HotChocolate.Execution.OrderedDictionary<TKey, TValue>.Clone() -> HotChocolate.Execution.OrderedDictionary<TKey, TValue>
~HotChocolate.Execution.OrderedDictionary<TKey, TValue>.CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int arrayIndex) -> void
~HotChocolate.Execution.OrderedDictionary<TKey, TValue>.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>
Expand Down
14 changes: 12 additions & 2 deletions src/HotChocolate/Core/src/Execution/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ HotChocolate.Execution.Processing.Selection.Id.get -> int
HotChocolate.Execution.Processing.Selection.InlineResolver.get -> HotChocolate.Resolvers.InlineFieldDelegate?
HotChocolate.Execution.Processing.Selection.PureResolver.get -> HotChocolate.Resolvers.PureFieldDelegate?
HotChocolate.Execution.Processing.Selection.ResolverPipeline.get -> HotChocolate.Resolvers.FieldDelegate?
HotChocolate.Execution.Processing.Selection.Selection(HotChocolate.Execution.Processing.Selection! selection) -> void
HotChocolate.Execution.Processing.Selection.Selection(int id, HotChocolate.Types.IObjectType! declaringType, HotChocolate.Types.IObjectField! field, HotChocolate.Language.FieldNode! selection, HotChocolate.Resolvers.FieldDelegate! resolverPipeline, HotChocolate.NameString? responseName = null, System.Collections.Generic.IReadOnlyDictionary<HotChocolate.NameString, HotChocolate.Execution.Processing.ArgumentValue!>? arguments = null, HotChocolate.Execution.Processing.SelectionIncludeCondition? includeCondition = null, bool internalSelection = false) -> void
HotChocolate.Execution.Processing.Selection.Selection(int id, HotChocolate.Types.IObjectType! declaringType, HotChocolate.Types.IObjectField! field, HotChocolate.Language.FieldNode! selection, HotChocolate.Resolvers.FieldDelegate? resolverPipeline, HotChocolate.Resolvers.PureFieldDelegate? pureResolver, HotChocolate.Resolvers.InlineFieldDelegate? inlineResolver, HotChocolate.NameString? responseName = null, System.Collections.Generic.IReadOnlyDictionary<HotChocolate.NameString, HotChocolate.Execution.Processing.ArgumentValue!>? arguments = null, HotChocolate.Execution.Processing.SelectionIncludeCondition? includeCondition = null, bool internalSelection = false, HotChocolate.Execution.Processing.SelectionExecutionStrategy? strategy = null) -> void
HotChocolate.Execution.Processing.Selection.Strategy.get -> HotChocolate.Execution.Processing.SelectionExecutionStrategy
Expand All @@ -57,7 +56,18 @@ HotChocolate.Execution.Processing.SelectionExecutionStrategy.Serial = 1 -> HotCh
HotChocolate.Execution.Processing.SelectionOptimizerContext.GetNextId() -> int
static HotChocolate.Execution.Options.ComplexityAnalyzerSettings.DefaultCalculation(HotChocolate.Execution.Pipeline.Complexity.ComplexityContext context) -> int
static HotChocolate.Execution.Processing.ArgumentCoercionHelper.TryCoerceArguments(this HotChocolate.Execution.Processing.IArgumentMap! arguments, HotChocolate.Resolvers.IResolverContext! resolverContext, out System.Collections.Generic.IReadOnlyDictionary<HotChocolate.NameString, HotChocolate.Execution.Processing.ArgumentValue!>? coercedArgs) -> bool
static Microsoft.Extensions.DependencyInjection.InternalSchemaServiceCollectionExtensions.GetCombinedServices(this System.IServiceProvider! services) -> System.IServiceProvider!
static Microsoft.Extensions.DependencyInjection.RequestExecutorBuilderExtensions.UseOperationComplexityAnalyzer(this HotChocolate.Execution.Configuration.IRequestExecutorBuilder! builder) -> HotChocolate.Execution.Configuration.IRequestExecutorBuilder!
virtual HotChocolate.Execution.Instrumentation.DiagnosticEventListener.ScaleTaskProcessors(HotChocolate.Execution.IRequestContext! context, int backlogSize, int processors) -> void
*REMOVED*HotChocolate.Execution.IRequestMiddleware
*REMOVED*HotChocolate.Execution.IRequestMiddleware.InvokeAsync(HotChocolate.Execution.IRequestContext! context, HotChocolate.Execution.RequestDelegate! next) -> System.Threading.Tasks.Task!
*REMOVED*HotChocolate.Execution.IRequestMiddleware.InvokeAsync(HotChocolate.Execution.IRequestContext! context, HotChocolate.Execution.RequestDelegate! next) -> System.Threading.Tasks.Task!
*REMOVED*HotChocolate.Execution.Processing.CompileResolverPipeline
*REMOVED*HotChocolate.Execution.Processing.Fragment.Fragment(HotChocolate.Types.IObjectType! typeCondition, HotChocolate.Language.FragmentSpreadNode! fragmentSpread, HotChocolate.Language.FragmentDefinitionNode! fragmentDefinition, HotChocolate.Execution.Processing.ISelectionSet! selectionSet, bool internalFragment, HotChocolate.Execution.Processing.SelectionIncludeCondition? includeCondition) -> void
*REMOVED*HotChocolate.Execution.Processing.Fragment.Fragment(HotChocolate.Types.IObjectType! typeCondition, HotChocolate.Language.InlineFragmentNode! inlineFragment, HotChocolate.Execution.Processing.ISelectionSet! selectionSet, bool internalFragment, HotChocolate.Execution.Processing.SelectionIncludeCondition? includeCondition) -> void
*REMOVED*HotChocolate.Execution.Processing.ISelection.ResolverPipeline.get -> HotChocolate.Resolvers.FieldDelegate!
*REMOVED*HotChocolate.Execution.Processing.Selection.ResolverPipeline.get -> HotChocolate.Resolvers.FieldDelegate!
*REMOVED*HotChocolate.Execution.Processing.Selection.Selection(HotChocolate.Types.IObjectType! declaringType, HotChocolate.Types.IObjectField! field, HotChocolate.Language.FieldNode! selection, HotChocolate.Resolvers.FieldDelegate! resolverPipeline, HotChocolate.NameString? responseName = null, System.Collections.Generic.IReadOnlyDictionary<HotChocolate.NameString, HotChocolate.Execution.Processing.ArgumentValue!>? arguments = null, HotChocolate.Execution.Processing.SelectionIncludeCondition? includeCondition = null, bool internalSelection = false) -> void
*REMOVED*HotChocolate.Execution.Processing.SelectionOptimizerContext.SelectionOptimizerContext(HotChocolate.ISchema! schema, System.Collections.Immutable.IImmutableStack<HotChocolate.Types.IObjectField!>! path, HotChocolate.Types.IObjectType! type, HotChocolate.Language.SelectionSetNode! selectionSet, System.Collections.Generic.IDictionary<string!, HotChocolate.Execution.Processing.Selection!>! fields, HotChocolate.Execution.Processing.CompileResolverPipeline! compileResolverPipeline) -> void
*REMOVED*static HotChocolate.Execution.Processing.ArgumentCoercionHelper.TryCoerceArguments(this HotChocolate.Execution.Processing.IArgumentMap! arguments, HotChocolate.Execution.IVariableValueCollection! variables, System.Action<HotChocolate.IError!>! reportError, out System.Collections.Generic.IReadOnlyDictionary<HotChocolate.NameString, HotChocolate.Execution.Processing.ArgumentValue!>? coercedArgs) -> bool
*REMOVED*static Microsoft.Extensions.DependencyInjection.RequestExecutorBuilderExtensions.AddMaxComplexityRule(this HotChocolate.Execution.Configuration.IRequestExecutorBuilder! builder, int maxAllowedComplexity) -> HotChocolate.Execution.Configuration.IRequestExecutorBuilder!
*REMOVED*HotChocolate.Execution.Processing.IPreparedOperation.ProposedTaskCount.get -> int
2 changes: 1 addition & 1 deletion src/HotChocolate/Core/src/Fetching/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HotChocolate.Fetching.BatchScheduler.DispatchOnSchedule.get -> bool
HotChocolate.Fetching.BatchScheduler.DispatchOnSchedule.set -> void
HotChocolate.Fetching.IBatchDispatcher.DispatchOnSchedule.get -> bool
HotChocolate.Fetching.IBatchDispatcher.DispatchOnSchedule.set -> void
HotChocolate.Fetching.IBatchDispatcher.DispatchOnSchedule.set -> void
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

18 changes: 9 additions & 9 deletions src/HotChocolate/Core/src/Types/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@
~HotChocolate.Resolvers.FieldReferenceBase.FieldReferenceBase(HotChocolate.Resolvers.FieldReferenceBase fieldReference) -> void
~HotChocolate.Resolvers.FieldReferenceBase.IsEqualTo(HotChocolate.Resolvers.FieldReferenceBase other) -> bool
~HotChocolate.Resolvers.FieldReferenceBase.IsReferenceEqualTo<T>(T value) -> bool
~HotChocolate.Resolvers.FieldResolver.Equals(HotChocolate.Resolvers.FieldResolver other) -> bool
HotChocolate.Resolvers.FieldResolver.Equals(HotChocolate.Resolvers.FieldResolver? other) -> bool
~HotChocolate.Resolvers.FieldResolver.FieldResolver(HotChocolate.NameString typeName, HotChocolate.NameString fieldName, HotChocolate.Resolvers.FieldResolverDelegate resolver) -> void
~HotChocolate.Resolvers.FieldResolver.FieldResolver(HotChocolate.Resolvers.FieldReference fieldReference, HotChocolate.Resolvers.FieldResolverDelegate resolver) -> void
~HotChocolate.Resolvers.FieldResolver.Resolver.get -> HotChocolate.Resolvers.FieldResolverDelegate
~HotChocolate.Resolvers.FieldResolver.ToFieldReference() -> HotChocolate.Resolvers.FieldReference
~HotChocolate.Resolvers.FieldResolver.WithFieldName(HotChocolate.NameString fieldName) -> HotChocolate.Resolvers.FieldResolver
~HotChocolate.Resolvers.FieldResolver.WithResolver(HotChocolate.Resolvers.FieldResolverDelegate resolver) -> HotChocolate.Resolvers.FieldResolver
~HotChocolate.Resolvers.FieldResolver.WithTypeName(HotChocolate.NameString typeName) -> HotChocolate.Resolvers.FieldResolver
HotChocolate.Resolvers.FieldResolver.FieldResolver(HotChocolate.Resolvers.FieldReference! fieldReference, HotChocolate.Resolvers.FieldResolverDelegate! resolver) -> void
HotChocolate.Resolvers.FieldResolver.Resolver.get -> HotChocolate.Resolvers.FieldResolverDelegate!
HotChocolate.Resolvers.FieldResolver.ToFieldReference() -> HotChocolate.Resolvers.FieldReference!
HotChocolate.Resolvers.FieldResolver.WithFieldName(HotChocolate.NameString fieldName) -> HotChocolate.Resolvers.FieldResolver!
HotChocolate.Resolvers.FieldResolver.WithResolver(HotChocolate.Resolvers.FieldResolverDelegate! resolver) -> HotChocolate.Resolvers.FieldResolver!
HotChocolate.Resolvers.FieldResolver.WithTypeName(HotChocolate.NameString typeName) -> HotChocolate.Resolvers.FieldResolver!
~HotChocolate.Resolvers.IDirectiveContext.Directive.get -> HotChocolate.Types.IDirective
~HotChocolate.Resolvers.IFieldSelection.Field.get -> HotChocolate.Types.IObjectField
~HotChocolate.Resolvers.IFieldSelection.Nodes.get -> System.Collections.Generic.IReadOnlyList<HotChocolate.Language.FieldNode>
Expand Down Expand Up @@ -848,8 +848,8 @@ override HotChocolate.Resolvers.FieldResolver.ToString() -> string!
~static HotChocolate.Configuration.Bindings.ResolverFieldBindingBuilder.New() -> HotChocolate.Configuration.Bindings.ResolverFieldBindingBuilder
~static HotChocolate.Configuration.Bindings.ResolverTypeBindingBuilder.New() -> HotChocolate.Configuration.Bindings.ResolverTypeBindingBuilder
~static HotChocolate.Configuration.SchemaOptions.FromOptions(HotChocolate.Configuration.IReadOnlySchemaOptions options) -> HotChocolate.Configuration.SchemaOptions
~static HotChocolate.Configuration.SchemaTypeResolver.TryInferSchemaType(HotChocolate.Types.Descriptors.ITypeInspector typeInspector, HotChocolate.Types.Descriptors.ExtendedTypeReference unresolvedType, out HotChocolate.Types.Descriptors.ExtendedTypeReference schemaType) -> bool
~static HotChocolate.Configuration.SchemaTypeResolver.TryInferSchemaTypeKind(HotChocolate.Types.Descriptors.ExtendedTypeReference unresolvedType, out HotChocolate.Types.TypeKind kind) -> bool
static HotChocolate.Configuration.SchemaTypeResolver.TryInferSchemaType(HotChocolate.Types.Descriptors.ITypeInspector! typeInspector, HotChocolate.Types.Descriptors.ExtendedTypeReference! unresolvedType, out HotChocolate.Types.Descriptors.ExtendedTypeReference? schemaType) -> bool
static HotChocolate.Configuration.SchemaTypeResolver.TryInferSchemaTypeKind(HotChocolate.Types.Descriptors.ExtendedTypeReference! unresolvedType, out HotChocolate.Types.TypeKind kind) -> bool
static HotChocolate.IdSchemaBuilderExtensions.EnableRelaySupport(this HotChocolate.ISchemaBuilder! schemaBuilder, HotChocolate.Types.Relay.RelayOptions? options = null) -> HotChocolate.ISchemaBuilder!
~static HotChocolate.Internal.TypeComponent.implicit operator HotChocolate.Internal.TypeComponent((HotChocolate.Internal.TypeComponentKind, HotChocolate.Internal.IExtendedType) component) -> HotChocolate.Internal.TypeComponent
~static HotChocolate.Internal.TypeDependencyHelper.RegisterDependencies(this HotChocolate.Configuration.ITypeDiscoveryContext context, HotChocolate.Types.Descriptors.Definitions.EnumTypeDefinition definition) -> void
Expand Down
Loading

0 comments on commit 19a3dfd

Please sign in to comment.