Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .build/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static IReadOnlyCollection<Output> DotNetBuildSonarSolution(
var workingDirectory = Path.GetDirectoryName(solutionFile);
var list = new List<Output>();

list.AddRange(DotNetTasks.DotNet($"new sln -n {Path.GetFileNameWithoutExtension(solutionFile)}", workingDirectory));
list.AddRange(DotNetTasks.DotNet($"new sln -n {Path.GetFileNameWithoutExtension(solutionFile)} --format sln", workingDirectory));

var projectsArg = string.Join(" ", projects.Select(t => $"\"{t}\""));

Expand All @@ -99,7 +99,7 @@ public static IReadOnlyCollection<Output> DotNetBuildTestSolution(
var workingDirectory = Path.GetDirectoryName(solutionFile);
var list = new List<Output>();

list.AddRange(DotNetTasks.DotNet($"new sln -n {Path.GetFileNameWithoutExtension(solutionFile)}", workingDirectory));
list.AddRange(DotNetTasks.DotNet($"new sln -n {Path.GetFileNameWithoutExtension(solutionFile)} --format sln", workingDirectory));

var projectsArg = string.Join(" ", projects.Select(t => $"\"{t}\""));

Expand Down
3 changes: 2 additions & 1 deletion src/HotChocolate/Core/src/Validation/DocumentValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public DocumentValidatorResult Validate(
break;
}

context.Reset();

start = ref Unsafe.Add(ref start, 1)!;
}

Expand Down Expand Up @@ -156,7 +158,6 @@ private DocumentValidatorContext RentContext(

private void ReturnContext(DocumentValidatorContext context)
{
context.Clear();
_contextPool.Return(context);
}
}
1 change: 1 addition & 0 deletions src/HotChocolate/Core/src/Validation/Rules/FieldVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ protected internal override void Reset()
s_fieldInfoPool.Return(_buffers[i]);
}

_buffers.Clear();
_buffers.Push(buffer);
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/HotChocolate/Core/src/Validation/Rules/ValueVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected override ISyntaxVisitorAction Enter(
ObjectValueNode node,
DocumentValidatorContext context)
{
var inputFieldNames = context.Features.GetOrSet<ValueVisitorFeature>().InputFieldNames;
var inputFieldNames = context.Features.GetRequired<ValueVisitorFeature>().InputFieldNames;
inputFieldNames.Clear();

for (var i = 0; i < node.Fields.Count; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ protected internal override void Reset()
{
NonNullString = null!;
FieldSets.Clear();
SelectionSetCost.Clear();
Processed.Clear();

if (_buffers.Count > 1)
{
Expand All @@ -379,6 +381,7 @@ protected internal override void Reset()
s_fieldInfoPool.Return(_buffers[i]);
}

_buffers.Clear();
_buffers.Push(buffer);
}
else
Expand Down
Loading