Skip to content
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

Feature/285 Remove unnecessary dependencies #300

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
3 changes: 3 additions & 0 deletions Solutions/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ dotnet_diagnostic.RCS1194.severity = None

# Localize string constants - apps that want localization can turn this back on
dotnet_diagnostic.CA1303.severity = None

# IDE0290: Use primary constructor
csharp_style_prefer_primary_constructors = false
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.10" />
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.7">
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.12" />
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JsonSchema.Net" Version="5.3.1" />
<PackageReference Include="JsonSchema.Net" Version="6.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="JsonPatch.Net" Version="2.1.0" />
<PackageReference Include="JsonPatch.Net" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions Solutions/Corvus.Json.Benchmarking/ValidateLargeDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ public void ValidateLargeArrayCorvus()
public void ValidateLargeArrayJsonEverything()
{
JsonEverything.EvaluationResults result = this.schema!.Evaluate(this.node, Options);
if (!result.IsValid)
if (!result.IsValid && result.Errors is IReadOnlyDictionary<string, string> errors)
{
result.Errors.ForEach(result => Console.WriteLine(result.Value));
foreach (KeyValuePair<string, string> r in errors)
{
Console.WriteLine(r.Value);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// </copyright>

using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Nodes;
using BenchmarkDotNet.Attributes;
Expand Down Expand Up @@ -97,9 +96,12 @@ public void ValidateLargeArrayCorvus()
public void ValidateLargeArrayJsonEverything()
{
JsonEverything.EvaluationResults result = this.schema!.Evaluate(this.node, Options);
if (!result.IsValid)
if (!result.IsValid && result.Errors is IReadOnlyDictionary<string, string> errors)
{
result.Errors.ForEach(result => Console.WriteLine(result.Value));
foreach (KeyValuePair<string, string> r in errors)
{
Console.WriteLine(r.Value);
}
}
}
}
122 changes: 51 additions & 71 deletions Solutions/Corvus.Json.Benchmarking/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"net8.0": {
"BenchmarkDotNet": {
"type": "Direct",
"requested": "[0.13.10, )",
"resolved": "0.13.10",
"contentHash": "p/LrTtR5TlwhZIvy2hG9VzTFWEDPS90r3QP9Q9pL4/B1iXzC/JNrpYyCWW3Xeg4vuiq/qV8hvJkJmT1sj+5LSw==",
"requested": "[0.13.12, )",
"resolved": "0.13.12",
"contentHash": "aKnzpUZJJfLBHG7zcfQZhCexZQKcJgElC8qcFUTXPMYFlVauJBobuOmtRnmrapqC2j7EjjZCsPxa3yLvFLx5/Q==",
"dependencies": {
"BenchmarkDotNet.Annotations": "0.13.10",
"BenchmarkDotNet.Annotations": "0.13.12",
"CommandLineParser": "2.9.1",
"Gee.External.Capstone": "2.3.0",
"Iced": "1.17.0",
Expand All @@ -22,42 +22,41 @@
},
"BenchmarkDotNet.Diagnostics.Windows": {
"type": "Direct",
"requested": "[0.13.10, )",
"resolved": "0.13.10",
"contentHash": "NY/QR980KGH6un/+fhFchW/Nx0dagvhf/eLdr7YBT024NP5GhJKJxB4OZoct6wpq6tld4xaeKmpR1l8OWLeYtw==",
"requested": "[0.13.12, )",
"resolved": "0.13.12",
"contentHash": "HdARbwcGFymgrSFoLVtuJaacyNW9WLuGljX0hsTarSO+80nI2OmbDS09R+I9kIeJ8Gn/1zJFjKgefmAlADhlww==",
"dependencies": {
"BenchmarkDotNet": "0.13.10",
"BenchmarkDotNet": "0.13.12",
"Microsoft.Diagnostics.Tracing.TraceEvent": "3.0.2"
}
},
"Endjin.RecommendedPractices.GitHub": {
"type": "Direct",
"requested": "[2.1.7, )",
"resolved": "2.1.7",
"contentHash": "7xiydtNIy4sM0c4C/GF/QRXukgVLuWf76VoPQuT0ShLpSeZSfzcmYpAniJrBUyEZp1GT32qQY0kPGTTGPOsISg==",
"requested": "[2.1.9, )",
"resolved": "2.1.9",
"contentHash": "gFCDZOu96fU+TfsAkZ7zLUzm8NX1/k3hWt7lbyf5HOn95+hYJQZ+g4bjs/Awx7JODsvNZpON8QlstZQVjPnRxg==",
"dependencies": {
"Endjin.RecommendedPractices": "2.1.7",
"Endjin.RecommendedPractices": "2.1.9",
"Microsoft.SourceLink.GitHub": "1.1.1"
}
},
"JsonPatch.Net": {
"type": "Direct",
"requested": "[2.1.0, )",
"resolved": "2.1.0",
"contentHash": "iTTUYeOk6tLGCwKTnqC/w28vkxaP8pO5BgIODpvwU3MM63XqZJ/p+iWZXhSvyRBUxqo3l+VHw49TnsxBZGTW9Q==",
"requested": "[3.0.0, )",
"resolved": "3.0.0",
"contentHash": "ZX2G7QoMDqShVL7QvGfXLJG/PwY3Tg0HhnOwdXJbTxcypNwiejqP++MCMxfOEZP07OlOGZGhzTDtJEWXuRy0ZQ==",
"dependencies": {
"JsonPointer.Net": "3.0.1"
"JsonPointer.Net": "4.0.0"
}
},
"JsonSchema.Net": {
"type": "Direct",
"requested": "[5.3.1, )",
"resolved": "5.3.1",
"contentHash": "1Ox9kMtire1U1O+obAKGbO8i8MAWbRTKDBda1GpNaEN6sxQUFD7h9laBZ1WmXFVbsv9grTBFfYJi/I/5zoPvsQ==",
"requested": "[6.0.4, )",
"resolved": "6.0.4",
"contentHash": "JMtN5g9cIqJ5Yazt17TSnYaznJJ6CjKD5nA8JhuDJiyaNAF/AiCC1zKYYJ0qS4LaJNvvMUmxCI4KqMTM/YOmlg==",
"dependencies": {
"JetBrains.Annotations": "2021.2.0",
"Json.More.Net": "1.9.0",
"JsonPointer.Net": "3.0.3"
"Json.More.Net": "2.0.0",
"JsonPointer.Net": "4.0.0"
}
},
"Microsoft.Extensions.Configuration.Json": {
Expand All @@ -75,23 +74,23 @@
},
"Roslynator.Analyzers": {
"type": "Direct",
"requested": "[4.6.1, )",
"resolved": "4.6.1",
"contentHash": "SDnYINWUo4n7/OsU2+ygeYexLWZ7KoMIfuNVY4V0S7ANVNHeg9YgEpK7G0zlTJmvWdIuoc0A85zZoyIyRj+Tag=="
"requested": "[4.9.0, )",
"resolved": "4.9.0",
"contentHash": "lFd4MmkllYR0dKlPWDokRwAvQnjNoPJztlncyzvnCG/wvGr5FzHAencngcJna/wkyDE0xIv7AnUccgCLsoIXTw=="
},
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.507, )",
"resolved": "1.2.0-beta.507",
"contentHash": "/FtugDT66cKJJ+GGH7rNpG6UDrT4iIWz45M6lrXXHobDUFDHw+q5VgkbiR+6ffTO564ge7w6fQh/eoQhVdJO8Q==",
"requested": "[1.2.0-beta.556, )",
"resolved": "1.2.0-beta.556",
"contentHash": "llRPgmA1fhC0I0QyFLEcjvtM2239QzKr/tcnbsjArLMJxJlu0AA5G7Fft0OI30pHF3MW63Gf4aSSsjc5m82J1Q==",
"dependencies": {
"StyleCop.Analyzers.Unstable": "1.2.0.507"
"StyleCop.Analyzers.Unstable": "1.2.0.556"
}
},
"BenchmarkDotNet.Annotations": {
"type": "Transitive",
"resolved": "0.13.10",
"contentHash": "abYKp+P5NBuam7q0w7AFgOYF3nqAvKBw6MLq96Kjk1WdaRDNpgBc6uCgOP4pVIH/g0IF9d4ubnFLBwiJuIAHMw=="
"resolved": "0.13.12",
"contentHash": "4zmFOOJqW1GrEP/t5XKgh97LH9r6zixGy2IA0JAaoTNNnZ8kPBt9u/XagsGNyV0e7rglOpFcWc6wI5EjefKpKA=="
},
"CommandLineParser": {
"type": "Transitive",
Expand All @@ -103,14 +102,6 @@
"resolved": "8.2.2",
"contentHash": "+zIp8d3sbtYaRbM6hqDs4Ui/z34j7DcUmleruZlYLE4CVxXq+MO8XJyIs42vzeTYFX+k0Iq1dEbBUnQ4z/Gnrw=="
},
"Corvus.Extensions": {
"type": "Transitive",
"resolved": "1.1.11",
"contentHash": "HYRd2hg8OkhejLs6ywYaGi/xuP71B3ffBeRQkZ5kywlyhxXxfQzyNuE7mvZqwP0ASFCpNLnkZwa3n3BgC59uQg==",
"dependencies": {
"System.Interactive": "3.2.0"
}
},
"Corvus.UriTemplates": {
"type": "Transitive",
"resolved": "1.2.3",
Expand All @@ -124,8 +115,8 @@
},
"Endjin.RecommendedPractices": {
"type": "Transitive",
"resolved": "2.1.7",
"contentHash": "NfTX2efpxMsDrRwQ8ykmLpVGBJfRF6xLeMl5r36SKOKsD1xjvlIDNm/SGR7fsjbKITQkjvmaUuNQkBDcH6EGIA==",
"resolved": "2.1.9",
"contentHash": "LzppiBrlPBj5TmVsQVxWoGv/MWfq+sAz0qkdB/ozUDS2hq31Pu8j2Cvk+BVlhvrb9eDUQxxHaLL4gbE7LiSAfQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1"
}
Expand All @@ -135,30 +126,28 @@
"resolved": "2.3.0",
"contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw=="
},
"Humanizer.Core": {
"type": "Transitive",
"resolved": "2.14.1",
"contentHash": "lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw=="
},
"Iced": {
"type": "Transitive",
"resolved": "1.17.0",
"contentHash": "8x+HCVTl/HHTGpscH3vMBhV8sknN/muZFw9s3TsI8SA6+c43cOTCi2+jE4KsU8pNLbJ++iF2ZFcpcXHXtDglnw=="
},
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2021.2.0",
"contentHash": "kKSyoVfndMriKHLfYGmr0uzQuI4jcc3TKGyww7buJFCYeHb/X0kodYBPL7n9454q7v6ASiRmDgpPGaDGerg/Hg=="
},
"Json.More.Net": {
"type": "Transitive",
"resolved": "1.9.0",
"contentHash": "MMjd2dOh32hLbcZg9YyA+7aEH9gu2cMTEAWrQY17in4+aEsPg2NtYTcwgWHJS9Tt2WUx+4iN1mNegR2uiEwsVQ==",
"dependencies": {
"System.Text.Json": "6.0.2"
}
"resolved": "2.0.0",
"contentHash": "U9pOGTOqkxibxCZiBATbTGDc76tqt4KcuC245FU3Bzw6yWuGHp2M8/bMdy4OztmO1ckwp3VvgWQ7sO75mOEI7g=="
},
"JsonPointer.Net": {
"type": "Transitive",
"resolved": "3.0.3",
"contentHash": "mCGQc15lHLp1R2CVhWiipnZurHXm93+LbPPAT/vXQm5PdHt6WQuYLhaEF8VZ+aXL9P2I6bGND6pDTEfqFs6gig==",
"resolved": "4.0.0",
"contentHash": "A2DjDKIdL8b93niaFaysAE9QynQ/U15Tw/MsNfra8NQPmoJZUoj86/ElTeJifGc2U86OTgFH5UdHAhIQRM7QQQ==",
"dependencies": {
"Json.More.Net": "1.8.0"
"Humanizer.Core": "2.14.1",
"Json.More.Net": "2.0.0"
}
},
"Microsoft.Bcl.AsyncInterfaces": {
Expand Down Expand Up @@ -356,8 +345,8 @@
},
"Microsoft.Extensions.ObjectPool": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q=="
"resolved": "8.0.2",
"contentHash": "LA7lDy048CVjGCwsPqRFVwH8vl5ooHmSFji13Oczw+mOnGhqenWXttkWcJ5dhIR0bhayZrQz4BaSPEVtE8Tt0A=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
Expand Down Expand Up @@ -415,8 +404,8 @@
},
"NodaTime": {
"type": "Transitive",
"resolved": "3.1.9",
"contentHash": "EzjwDOtsETlXWBDE6qvTQqc3guP+9xrAOf9j1mHL++UD4VeZay+dbCPNnXyZhoQMkKAOZ/+hIOtz7STl0Rkknw==",
"resolved": "3.1.11",
"contentHash": "AYSiCHp1PLzWKVf7hEL3MJ0q9kzOWMNIaTVysXk4XKrDBzK5PF2wpd4LsAl+EIQ2Hbvu+vw4oFaexcXzCuY1lQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.7.1"
}
Expand All @@ -431,8 +420,8 @@
},
"StyleCop.Analyzers.Unstable": {
"type": "Transitive",
"resolved": "1.2.0.507",
"contentHash": "gTY3IQdRqDJ4hbhSA3e/R48oE8b/OiKfvwkt1QdNVfrJK2gMHBV8ldaHJ885jxWZfllK66soa/sdcjh9bX49Tw=="
"resolved": "1.2.0.556",
"contentHash": "zvn9Mqs/ox/83cpYPignI8hJEM2A93s2HkHs8HYMOAQW0PkampyoErAiIyKxgTLqbbad29HX/shv/6LGSjPJNQ=="
},
"System.Buffers": {
"type": "Transitive",
Expand All @@ -454,11 +443,6 @@
"resolved": "8.0.0",
"contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ=="
},
"System.Interactive": {
"type": "Transitive",
"resolved": "3.2.0",
"contentHash": "hoXiC7r+WvT/oQ/QcsCgIJMEcXKXyM26BvIcFVRgEMzXk9URu8oR2ADqrnHwIRiJmxQC/q8b3KTQSkdoFRO4TA=="
},
"System.Management": {
"type": "Transitive",
"resolved": "5.0.0",
Expand Down Expand Up @@ -529,14 +513,10 @@
"type": "Project",
"dependencies": {
"CommunityToolkit.HighPerformance": "[8.2.2, )",
"Corvus.Extensions": "[1.1.11, )",
"Corvus.UriTemplates": "[1.2.3, )",
"Microsoft.Extensions.Http": "[8.0.0, )",
"Microsoft.Extensions.ObjectPool": "[8.0.0, )",
"NodaTime": "[3.1.9, )",
"System.Buffers": "[4.5.1, )",
"System.Collections.Immutable": "[8.0.0, )",
"System.Text.Json": "[8.0.0, )"
"Microsoft.Extensions.ObjectPool": "[8.0.2, )",
"NodaTime": "[3.1.11, )"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Corvus.Extensions" Version="1.1.11" />
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.7">
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.9">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -35,7 +34,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Roslynator.Analyzers" Version="4.6.2" />
<PackageReference Update="Roslynator.Analyzers" Version="4.11.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public ImmutableArray<PropertyDeclaration> Properties
{
get
{
return this.TypeDeclaration.Properties.OrderBy(p => p.DotnetPropertyName).ToImmutableArray();
return [.. this.TypeDeclaration.Properties.OrderBy(p => p.DotnetPropertyName)];
}
}

Expand All @@ -180,7 +180,7 @@ public ImmutableArray<PropertyDeclaration> RequiredProperties
{
get
{
return this.TypeDeclaration.Properties.Where(p => p.IsDefinedInLocalScope && p.IsRequired).OrderBy(p => p.DotnetPropertyName).ToImmutableArray();
return [.. this.TypeDeclaration.Properties.Where(p => p.IsDefinedInLocalScope && p.IsRequired).OrderBy(p => p.DotnetPropertyName)];
}
}

Expand All @@ -191,7 +191,7 @@ public ImmutableArray<PropertyDeclaration> OptionalProperties
{
get
{
return this.TypeDeclaration.Properties.Where(p => p.IsDefinedInLocalScope && !p.IsRequired).OrderBy(p => p.DotnetPropertyName).ToImmutableArray();
return [.. this.TypeDeclaration.Properties.Where(p => p.IsDefinedInLocalScope && !p.IsRequired).OrderBy(p => p.DotnetPropertyName)];
}
}

Expand All @@ -202,7 +202,7 @@ public ImmutableArray<PropertyDeclaration> RequiredAllOfAndRefProperties
{
get
{
return this.TypeDeclaration.Properties.Where(p => p.IsRequired).OrderBy(p => p.DotnetPropertyName).ToImmutableArray();
return [.. this.TypeDeclaration.Properties.Where(p => p.IsRequired).OrderBy(p => p.DotnetPropertyName)];
}
}

Expand All @@ -213,7 +213,7 @@ public ImmutableArray<PropertyDeclaration> OptionalAllOfAndRefProperties
{
get
{
return this.TypeDeclaration.Properties.Where(p => !p.IsRequired).OrderBy(p => p.DotnetPropertyName).ToImmutableArray();
return [.. this.TypeDeclaration.Properties.Where(p => !p.IsRequired).OrderBy(p => p.DotnetPropertyName)];
}
}

Expand All @@ -224,7 +224,7 @@ public ImmutableArray<PropertyDeclaration> Defaults
{
get
{
return this.TypeDeclaration.Properties.Where(p => p.HasDefaultValue).OrderBy(p => p.DotnetPropertyName).ToImmutableArray();
return [.. this.TypeDeclaration.Properties.Where(p => p.HasDefaultValue).OrderBy(p => p.DotnetPropertyName)];
}
}

Expand Down Expand Up @@ -1018,7 +1018,7 @@ public bool HasRef
}

/// <summary>
/// Gets the dotnet typename for the non-naked reference.
/// Gets the dotnet type name for the non-naked reference.
/// </summary>
public string RefDotnetTypeName
{
Expand Down
Loading
Loading