From aabc3a56065fc355cfe3a446440d6de5391bf60a Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Sat, 23 Mar 2024 17:38:19 -0500 Subject: [PATCH] Release 0.2.0 [Breaking] 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. 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. [New] 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. --- src/CoreApi/IFileSystemApi.cs | 6 +- src/IDataBlock.cs | 22 +------ src/IMerkleNode.cs | 3 +- src/IPublishedMessage.cs | 11 ++++ src/IpfsCore.csproj | 116 +++++++++++++++++++--------------- 5 files changed, 80 insertions(+), 78 deletions(-) diff --git a/src/CoreApi/IFileSystemApi.cs b/src/CoreApi/IFileSystemApi.cs index c231c0db..5130b6b5 100644 --- a/src/CoreApi/IFileSystemApi.cs +++ b/src/CoreApi/IFileSystemApi.cs @@ -161,11 +161,9 @@ public interface IFileSystemApi /// Is used to stop the task. When cancelled, the is raised. /// /// - /// A task that represents the asynchronous operation. The task's value is - /// an The - /// and are set to null. + /// A task that represents the asynchronous operation. /// - Task ListFileAsync(string path, CancellationToken cancel = default); + Task ListAsync(string path, CancellationToken cancel = default); /// /// Download IPFS objects as a TAR archive. diff --git a/src/IDataBlock.cs b/src/IDataBlock.cs index 49e31623..6d30e9cb 100644 --- a/src/IDataBlock.cs +++ b/src/IDataBlock.cs @@ -7,8 +7,7 @@ namespace Ipfs /// /// /// A DataBlock has an unique ID - /// and some data ( - /// or ). + /// and some data. /// /// It is useful to talk about them as "blocks" in Bitswap /// and other things that do not care about what is being stored. @@ -17,25 +16,6 @@ namespace Ipfs /// public interface IDataBlock { - /// - /// Contents as a byte array. - /// - /// - /// It is never null. - /// - /// - /// The contents as a sequence of bytes. - /// - byte[] DataBytes { get; } - - /// - /// Contents as a stream of bytes. - /// - /// - /// The contents as a stream of bytes. - /// - Stream DataStream { get; } - /// /// The unique ID of the data. /// diff --git a/src/IMerkleNode.cs b/src/IMerkleNode.cs index a04271c2..a6be0172 100644 --- a/src/IMerkleNode.cs +++ b/src/IMerkleNode.cs @@ -7,8 +7,7 @@ namespace Ipfs /// /// /// A MerkleNode has a sequence of navigable - /// and some data ( - /// or ). + /// and some data. /// /// /// The type of used by this node. diff --git a/src/IPublishedMessage.cs b/src/IPublishedMessage.cs index 6eb512a1..d115117e 100644 --- a/src/IPublishedMessage.cs +++ b/src/IPublishedMessage.cs @@ -11,6 +11,17 @@ namespace Ipfs /// public interface IPublishedMessage : IDataBlock { + /// + /// Contents as a byte array. + /// + /// + /// It is never null. + /// + /// + /// The contents as a sequence of bytes. + /// + byte[] DataBytes { get; } + /// /// The sender of the message. /// diff --git a/src/IpfsCore.csproj b/src/IpfsCore.csproj index 653d4042..0cd3836f 100644 --- a/src/IpfsCore.csproj +++ b/src/IpfsCore.csproj @@ -1,60 +1,74 @@  - - netstandard2.0; - IpfsShipyard.Ipfs.Core - Ipfs - portable - - - 0.1.0 - $(Version) - - - IpfsShipyard.Ipfs.Core - IPFS Shipyard, Arlo Godfrey, Richard Schneider - IPFS Core Objects - + + netstandard2.0; + IpfsShipyard.Ipfs.Core + Ipfs + portable + 12.0 + + + 0.2.0 + $(Version) + + + IpfsShipyard.Ipfs.Core + IPFS Shipyard, Arlo Godfrey, Richard Schneider + IPFS Core Objects + Backed by the IPFS Shipyard and developer community. Picking up where Richard Schneider / makaretu left off. Core objects and interfaces for IPFS. 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. - false - ipfs peer-to-peer distributed file-system - True - https://github.com/ipfs-shipyard/net-ipfs-core - icon.png - - true - true - - - - - true - - false - - true - snupkg - .pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder) - - - - - - - - - - - - - - - - - + false + ipfs peer-to-peer distributed file-system + True + https://github.com/ipfs-shipyard/net-ipfs-core + icon.png + + true + true + +--- 0.2.0 --- +[Breaking] +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. +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. + +[New] +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. + + + + + + true + + false + + true + snupkg + .pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder) + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + +