Skip to content

Commit

Permalink
Merge pull request #139 from richardschneider/netcoreapp2.2
Browse files Browse the repository at this point in the history
Netcoreapp2.2
  • Loading branch information
richardschneider authored Aug 15, 2019
2 parents 3e16510 + ef6ed8a commit 882372d
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- run: dotnet build -c Release --no-restore --framework netstandard2 ./src
- run: dotnet build -c Release --no-restore --framework netcoreapp2.2 ./IpfsServer
- run: dotnet build -c Release --no-restore --framework netcoreapp2.2 ./IpfsCli
- run: dotnet test --logger "console;verbosity=normal" -c Release --no-restore --framework netcoreapp2.12 ./test --filter TestCategory!=IPv6
- run: dotnet test --logger "console;verbosity=normal" -c Release --no-restore --framework netcoreapp2.2 ./test --filter TestCategory!=IPv6

# Circle CI does not completely support IPv6
# see https://discuss.circleci.com/t/ipv6-support/13571
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ before_script:

script:
- dotnet build -c Release --no-restore --framework netstandard2 ./src
- dotnet test --logger "console;verbosity=normal" -c Release --no-restore --framework netcoreapp2.1 ./test --filter TestCategory!=IPv6
- dotnet test --logger "console;verbosity=normal" -c Release --no-restore --framework netcoreapp2.2 ./test --filter TestCategory!=IPv6
2 changes: 1 addition & 1 deletion IpfsCli/IpfsCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Common.Logging" Version="3.4.1" />
<PackageReference Include="Ipfs.Http.Client" Version="0.30.0" />
<PackageReference Include="Ipfs.Http.Client" Version="0.31.0" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0" />
Expand Down
6 changes: 3 additions & 3 deletions IpfsServer/IpfsServer.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssemblyName>Ipfs.Server</AssemblyName>
<RootNamespace>Ipfs.Server</RootNamespace>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Expand All @@ -15,11 +15,11 @@
<ItemGroup>
<PackageReference Include="Ipfs.Core" Version="0.53.1" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.9" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.9" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\IpfsEngine.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_script:

after_test:
# Generate coverage report
- dotnet test -c %CONFIGURATION% -f netcoreapp2.1 --no-build --no-restore test /p:CollectCoverage=true
- dotnet test -c %CONFIGURATION% -f netcoreapp2.2 --no-build --no-restore test /p:CollectCoverage=true
- choco install codecov -y
- codecov -f "test/coverage.opencover.xml"
- dotnet tool install --global coveralls.net --version 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion spike/spike.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 5 additions & 7 deletions src/CoreApi/ObjectApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ public ObjectApi(IpfsEngine ipfs)

public async Task<IEnumerable<IMerkleLink>> LinksAsync(Cid id, CancellationToken cancel = default(CancellationToken))
{
var block = await ipfs.Block.GetAsync(id, cancel).ConfigureAwait(false);
try
{
var node = new DagNode(block.DataStream);
return node.Links;
}
catch
if (id.ContentType != "dag-pb")
{
return Enumerable.Empty<IMerkleLink>();
}

var block = await ipfs.Block.GetAsync(id, cancel).ConfigureAwait(false);
var node = new DagNode(block.DataStream);
return node.Links;
}

public Task<DagNode> NewAsync(string template = null, CancellationToken cancel = default(CancellationToken))
Expand Down
4 changes: 2 additions & 2 deletions src/IpfsEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
<PackageReference Include="PeterO.Cbor" Version="3.1.0" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5" />
<PackageReference Include="protobuf-net" Version="2.4.0" />
<PackageReference Include="SharpZipLib" Version="1.0.0" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19270-01" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.0.102" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.3.13" PrivateAssets="All" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions test/IpfsEngineTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.2</TargetFrameworks>

<IsPackable>false</IsPackable>
<DebugType>portable</DebugType>
Expand All @@ -17,15 +17,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" PrivateAssets="all" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" PrivateAssets="all" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" PrivateAssets="all" />
<PackageReference Include="coverlet.msbuild" Version="2.6.2" PrivateAssets="all" />
<PackageReference Include="coverlet.msbuild" Version="2.6.3" PrivateAssets="all" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.1.0" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 882372d

Please sign in to comment.