Skip to content

Commit bdc52b4

Browse files
authored
Merge pull request #29 from ipfs-shipyard/rel/0.2.0
Release 0.2.0
2 parents 15cf18b + 747d99a commit bdc52b4

File tree

5 files changed

+80
-78
lines changed

5 files changed

+80
-78
lines changed

src/CoreApi/IFileSystemApi.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,9 @@ public interface IFileSystemApi
161161
/// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
162162
/// </param>
163163
/// <returns>
164-
/// A task that represents the asynchronous operation. The task's value is
165-
/// an <see cref="IFileSystemNode"/> The <see cref="IDataBlock.DataBytes"/>
166-
/// and <see cref="IDataBlock.DataStream"/> are set to <b>null</b>.
164+
/// A task that represents the asynchronous operation.
167165
/// </returns>
168-
Task<IFileSystemNode> ListFileAsync(string path, CancellationToken cancel = default);
166+
Task<IFileSystemNode> ListAsync(string path, CancellationToken cancel = default);
169167

170168
/// <summary>
171169
/// Download IPFS objects as a TAR archive.

src/IDataBlock.cs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ namespace Ipfs
77
/// </summary>
88
/// <remarks>
99
/// A <b>DataBlock</b> has an <see cref="Id">unique ID</see>
10-
/// and some data (<see cref="IDataBlock.DataBytes"/>
11-
/// or <see cref="IDataBlock.DataStream"/>).
10+
/// and some data.
1211
/// <para>
1312
/// It is useful to talk about them as "blocks" in Bitswap
1413
/// and other things that do not care about what is being stored.
@@ -17,25 +16,6 @@ namespace Ipfs
1716
/// <seealso cref="IMerkleNode{Link}"/>
1817
public interface IDataBlock
1918
{
20-
/// <summary>
21-
/// Contents as a byte array.
22-
/// </summary>
23-
/// <remarks>
24-
/// It is never <b>null</b>.
25-
/// </remarks>
26-
/// <value>
27-
/// The contents as a sequence of bytes.
28-
/// </value>
29-
byte[] DataBytes { get; }
30-
31-
/// <summary>
32-
/// Contents as a stream of bytes.
33-
/// </summary>
34-
/// <value>
35-
/// The contents as a stream of bytes.
36-
/// </value>
37-
Stream DataStream { get; }
38-
3919
/// <summary>
4020
/// The unique ID of the data.
4121
/// </summary>

src/IMerkleNode.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ namespace Ipfs
77
/// </summary>
88
/// <remarks>
99
/// A <b>MerkleNode</b> has a sequence of navigable <see cref="Links"/>
10-
/// and some data (<see cref="IDataBlock.DataBytes"/>
11-
/// or <see cref="IDataBlock.DataStream"/>).
10+
/// and some data.
1211
/// </remarks>
1312
/// <typeparam name="Link">
1413
/// The type of <see cref="IMerkleLink"/> used by this node.

src/IPublishedMessage.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ namespace Ipfs
1111
/// </remarks>
1212
public interface IPublishedMessage : IDataBlock
1313
{
14+
/// <summary>
15+
/// Contents as a byte array.
16+
/// </summary>
17+
/// <remarks>
18+
/// It is never <b>null</b>.
19+
/// </remarks>
20+
/// <value>
21+
/// The contents as a sequence of bytes.
22+
/// </value>
23+
byte[] DataBytes { get; }
24+
1425
/// <summary>
1526
/// The sender of the message.
1627
/// </summary>

src/IpfsCore.csproj

Lines changed: 65 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,74 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;</TargetFrameworks>
5-
<AssemblyName>IpfsShipyard.Ipfs.Core</AssemblyName>
6-
<RootNamespace>Ipfs</RootNamespace>
7-
<DebugType>portable</DebugType>
8-
9-
<!-- https://semver.org/spec/v2.0.0.html -->
10-
<Version>0.1.0</Version>
11-
<AssemblyVersion>$(Version)</AssemblyVersion>
12-
13-
<!-- Nuget specs -->
14-
<PackageId>IpfsShipyard.Ipfs.Core</PackageId>
15-
<Authors>IPFS Shipyard, Arlo Godfrey, Richard Schneider</Authors>
16-
<Title>IPFS Core Objects</Title>
17-
<Description>
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;</TargetFrameworks>
5+
<AssemblyName>IpfsShipyard.Ipfs.Core</AssemblyName>
6+
<RootNamespace>Ipfs</RootNamespace>
7+
<DebugType>portable</DebugType>
8+
<LangVersion>12.0</LangVersion>
9+
10+
<!-- https://semver.org/spec/v2.0.0.html -->
11+
<Version>0.2.0</Version>
12+
<AssemblyVersion>$(Version)</AssemblyVersion>
13+
14+
<!-- Nuget specs -->
15+
<PackageId>IpfsShipyard.Ipfs.Core</PackageId>
16+
<Authors>IPFS Shipyard, Arlo Godfrey, Richard Schneider</Authors>
17+
<Title>IPFS Core Objects</Title>
18+
<Description>
1819
Backed by the IPFS Shipyard and developer community. Picking up where Richard Schneider / makaretu left off.
1920
Core objects and interfaces for IPFS.
2021

2122
The InterPlanetary File System is the permanent web. IPFS enables the creation of completely distributed applications. It is a new hypermedia distribution protocol, addressed by content and identities. It aims to make the web faster, safer, and more open.
2223
</Description>
23-
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
24-
<PackageTags>ipfs peer-to-peer distributed file-system</PackageTags>
25-
<IncludeSymbols>True</IncludeSymbols>
26-
<PackageProjectUrl>https://github.com/ipfs-shipyard/net-ipfs-core</PackageProjectUrl>
27-
<PackageIcon>icon.png</PackageIcon>
28-
29-
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
30-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
31-
</PropertyGroup>
32-
33-
<PropertyGroup>
34-
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
35-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
36-
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
37-
<EmbedUntrackedSources>false</EmbedUntrackedSources>
38-
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
39-
<IncludeSymbols>true</IncludeSymbols>
40-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
41-
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
42-
</PropertyGroup>
43-
44-
<ItemGroup>
45-
<PackageReference Include="Google.Protobuf" Version="3.21.1" />
46-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
47-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
48-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5" />
49-
<PackageReference Include="SimpleBase" Version="1.3.1" />
50-
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All" />
51-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
52-
</ItemGroup>
53-
54-
<ItemGroup>
55-
<Protobuf Include="**/*.proto" />
56-
<EmbeddedResource Include="**/*.proto" />
57-
<None Include="icon.png" Pack="true" PackagePath="\" />
58-
</ItemGroup>
24+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
25+
<PackageTags>ipfs peer-to-peer distributed file-system</PackageTags>
26+
<IncludeSymbols>True</IncludeSymbols>
27+
<PackageProjectUrl>https://github.com/ipfs-shipyard/net-ipfs-core</PackageProjectUrl>
28+
<PackageIcon>icon.png</PackageIcon>
29+
30+
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
31+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
32+
<PackageReleaseNotes>
33+
--- 0.2.0 ---
34+
[Breaking]
35+
IDataBlock.DataStream was removed. This pattern encouraged async calls behind synchronous property getters, which is a bad practice and can cause deadlocks. Call the async methods directly on the API instead.
36+
The obsolete IFileSystemApi.ListFileAsync was removed due to prior deprecation and removal in Kubo 0.26.0. Use IFileSystemApi.ListAsync and MfsApi.StatAsync instead. See https://github.com/ipfs/kubo/issues/7493#issuecomment-2016563729.
37+
38+
[New]
39+
Added missing IFileSystemApi.ListAsync. Doesn't fully replace the removed IFileSystemApi.ListFileAsync, but is a step in the right direction. See https://github.com/ipfs/kubo/issues/7493#issuecomment-2016563729.
40+
</PackageReleaseNotes>
41+
</PropertyGroup>
42+
43+
<PropertyGroup>
44+
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
45+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
46+
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
47+
<EmbedUntrackedSources>false</EmbedUntrackedSources>
48+
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
49+
<IncludeSymbols>true</IncludeSymbols>
50+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
51+
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder>
52+
</PropertyGroup>
53+
54+
<ItemGroup>
55+
<PackageReference Include="Google.Protobuf" Version="3.21.1" />
56+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
57+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
58+
<PackageReference Include="PolySharp" Version="1.14.1">
59+
<PrivateAssets>all</PrivateAssets>
60+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
61+
</PackageReference>
62+
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5" />
63+
<PackageReference Include="SimpleBase" Version="1.3.1" />
64+
<PackageReference Include="Grpc.Tools" Version="2.46.3" PrivateAssets="All" />
65+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
66+
</ItemGroup>
67+
68+
<ItemGroup>
69+
<Protobuf Include="**/*.proto" />
70+
<EmbeddedResource Include="**/*.proto" />
71+
<None Include="icon.png" Pack="true" PackagePath="\" />
72+
</ItemGroup>
5973

6074
</Project>

0 commit comments

Comments
 (0)