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

Update tooling; add a net5.0 target #122

Merged
merged 2 commits into from
Dec 2, 2020
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
5 changes: 5 additions & 0 deletions Superpower.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{66B005
Build.ps1 = Build.ps1
LICENSE = LICENSE
README.md = README.md
global.json = global.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2ED926D3-7AC8-4BFD-A16B-74D942602968}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asset", "asset", "{69238E6E-26AB-494B-8CBD-65F8C1F0696A}"
ProjectSection(SolutionItems) = preProject
asset\Superpower.snk = asset\Superpower.snk
asset\Superpower.svg = asset\Superpower.svg
asset\Superpower-Transparent-400px.png = asset\Superpower-Transparent-400px.png
asset\Superpower-White-200px.png = asset\Superpower-White-200px.png
asset\Superpower-White-400px.png = asset\Superpower-White-400px.png
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{7533E145-1C93-4348-A70D-E68746C5438C}"
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "5.0.100",
"rollForward": "latestFeature"
}
}
5 changes: 4 additions & 1 deletion sample/DateTimeTextParser/DateTimeParser.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Superpower\Superpower.csproj" />
</ItemGroup>

</Project>
18 changes: 4 additions & 14 deletions sample/IntCalc/IntCalc.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' ">
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
</PropertyGroup>


<PropertyGroup>
<AssemblyName>IntCalc</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>IntCalc</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Superpower\Superpower.csproj" />
</ItemGroup>

</Project>
19 changes: 0 additions & 19 deletions sample/IntCalc/Properties/AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion sample/JsonParser/JsonParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/Superpower/ParserExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public static Result<T> TryParse<T>(this TextParser<T> parser, string input)
public static TokenListParserResult<TKind, T> TryParse<TKind, T>(this TokenListParser<TKind, T> parser, TokenList<TKind> input)
{
if (parser == null) throw new ArgumentNullException(nameof(parser));
if (input == null) throw new ArgumentNullException(nameof(input));

return parser(input);
}
Expand Down Expand Up @@ -90,7 +89,6 @@ public static T Parse<T>(this TextParser<T> parser, string input)
public static T Parse<TKind, T>(this TokenListParser<TKind, T> parser, TokenList<TKind> input)
{
if (parser == null) throw new ArgumentNullException(nameof(parser));
if (input == null) throw new ArgumentNullException(nameof(input));

var result = parser.TryParse(input);

Expand Down
13 changes: 8 additions & 5 deletions src/Superpower/Superpower.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<Description>A parser combinator library for C#</Description>
<VersionPrefix>3.0.0</VersionPrefix>
<Authors>Datalust;Superpower Contributors;Sprache Contributors</Authors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Superpower</AssemblyName>
<AssemblyOriginatorKeyFile>../../asset/Superpower.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>Superpower</PackageId>
<PackageTags>superpower;parser</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/datalust/superpower/dev/asset/Superpower-White-400px.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/datalust/superpower</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<PackageIcon>Superpower-White-400px.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RepositoryUrl>https://github.com/datalust/superpower</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);CHECKED</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\asset\Superpower-White-400px.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
</Project>
11 changes: 1 addition & 10 deletions test/Superpower.Benchmarks/Superpower.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFramework>net5.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

Expand All @@ -20,13 +20,4 @@
<PackageReference Include="Sprache" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
6 changes: 1 addition & 5 deletions test/Superpower.Tests/Superpower.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>Superpower.Tests</AssemblyName>
<AssemblyOriginatorKeyFile>../../asset/Superpower.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand All @@ -10,7 +10,6 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Superpower\Superpower.csproj" />
Expand All @@ -23,7 +22,4 @@
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>