Skip to content

Commit

Permalink
Replace custom shims with PolySharp (#613)
Browse files Browse the repository at this point in the history
* PolySharp provides IsExternalInit
* remove unused usings
* update BenchmarkDotNet
  • Loading branch information
lahma authored Dec 8, 2023
1 parent 89706a0 commit f62d8a5
Show file tree
Hide file tree
Showing 19 changed files with 5 additions and 43 deletions.
1 change: 0 additions & 1 deletion Fluid.Benchmarks/BaseBenchmarks.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.IO;
using System.Reflection;

namespace Fluid.Benchmarks
{
Expand Down
2 changes: 1 addition & 1 deletion Fluid.Benchmarks/Fluid.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.11" />
<PackageReference Include="DotLiquid" Version="2.2.692" />
<PackageReference Include="Liquid.NET" Version="0.10.0" />
<PackageReference Include="Scriban" Version="5.9.0" />
Expand Down
1 change: 1 addition & 0 deletions Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="PolySharp" Version="1.14.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
Expand Down
10 changes: 0 additions & 10 deletions Fluid.MvcViewEngine/IsExternalInit.cs

This file was deleted.

1 change: 0 additions & 1 deletion Fluid.Tests/CaseStatementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Threading.Tasks;
using Fluid.Ast;
using Fluid.Values;
using Microsoft.Extensions.Primitives;
using Xunit;

namespace Fluid.Tests
Expand Down
2 changes: 0 additions & 2 deletions Fluid.Tests/Extensibility/ExtensibilityTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Fluid.Ast;
using Parlot.Fluent;
using System;
using Xunit;

namespace Fluid.Tests.Extensibility
Expand Down
1 change: 0 additions & 1 deletion Fluid.Tests/ForStatementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Threading.Tasks;
using Fluid.Ast;
using Fluid.Values;
using Microsoft.Extensions.Primitives;
using Xunit;

namespace Fluid.Tests
Expand Down
1 change: 0 additions & 1 deletion Fluid.Tests/Mocks/MockFileProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

namespace Fluid.Tests.Mocks
{
Expand Down
1 change: 0 additions & 1 deletion Fluid.Tests/MvcViewEngine/SampleTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#if !NETCOREAPP2_1
using Fluid.Ast;
using Fluid.MvcViewEngine;
using Fluid.ViewEngine;
using Xunit;

Expand Down
4 changes: 1 addition & 3 deletions Fluid.Tests/NumberFiltersTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Linq;
using Fluid.Values;
using Fluid.Values;
using Fluid.Filters;
using Xunit;
using System;

namespace Fluid.Tests
{
Expand Down
1 change: 0 additions & 1 deletion Fluid.Tests/UnlessStatementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Threading.Tasks;
using Fluid.Ast;
using Fluid.Values;
using Microsoft.Extensions.Primitives;
using Xunit;

namespace Fluid.Tests
Expand Down
1 change: 0 additions & 1 deletion Fluid.ViewEngine/FluidViewEngineOptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.Extensions.FileProviders;
using System;
using System.Collections.Generic;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
Expand Down
1 change: 0 additions & 1 deletion Fluid.ViewEngine/FluidViewParser.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Fluid.Ast;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using static Parlot.Fluent.Parsers;

Expand Down
5 changes: 0 additions & 5 deletions Fluid/ExceptionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,5 @@ public static void ThrowMaximumStatementsException()
{
throw new InvalidOperationException("The maximum number of statements has been reached. Your script took too long to run.");
}

#if NETSTANDARD2_0
[AttributeUsage(AttributeTargets.Method)]
private sealed class DoesNotReturnAttribute : Attribute {}
#endif
}
}
3 changes: 2 additions & 1 deletion Fluid/Fluid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
<ItemGroup>
<PackageReference Include="Parlot" Version="0.0.24" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" Version="1.1.1" />
<PackageReference Include="TimeZoneConverter" Version="6.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="PolySharp" Version="1.14.0" PrivateAssets="all" />
<PackageReference Include="TimeZoneConverter" Version="6.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
Expand Down
1 change: 0 additions & 1 deletion Fluid/FluidParserExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Fluid.Ast;
using Fluid.Parser;
using Parlot.Fluent;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down
10 changes: 0 additions & 10 deletions Fluid/IsExternalInit.cs

This file was deleted.

1 change: 0 additions & 1 deletion Fluid/TemplateOptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Fluid.Filters;
using Fluid.Values;
using Microsoft.Extensions.FileProviders;
using System;
using System.Collections.Generic;
Expand Down
1 change: 0 additions & 1 deletion Fluid/Values/FluidValueExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Globalization;
using TimeZoneConverter;

namespace Fluid.Values
{
Expand Down

0 comments on commit f62d8a5

Please sign in to comment.