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

Release 0.2.0; Kubo 0.26.0+ support #34

Merged
merged 4 commits into from
Apr 3, 2024
Merged

Release 0.2.0; Kubo 0.26.0+ support #34

merged 4 commits into from
Apr 3, 2024

Conversation

Arlodotexe
Copy link
Collaborator

@Arlodotexe Arlodotexe commented Mar 23, 2024

This PR closes #32 and fixes several issues using the library with Kubo.
 
[Breaking]

  • Inherited breaking changes from IpfsShipyard.Ipfs.Core 0.2.0 and 0.3.0
  • 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.
  • A full analysis of the Bitswap API was made to bring it in line with Kubo's RPC API.
  • GetAsync and UnwantAsync were removed from IBitswapApi. These were not part of Kubo's API, but were intended for custom implementations. To migrate, derive IBitswapApi and add your custom functionality in your library.
  • The return type for IBlockApi.GetAsync was changed from IDataBlock to byte[], since IDataBlock was removed in 0.2.0. Kubo's RPC API (including the JS implementation) simply returns the buffer, and so are we now.
  • ILinkedNode was removed as it was not used anywhere in the broader net-ipfs codebase and seems to have been placed there years ago for future plans that were never carried out.

[New]

  • Added missing IFileSystemApi.ListAsync. Doesn't fully replace the removed IFileSystemApi.ListFileAsync, but is a step in the right direction. For getting file sizes, use MfsApi.StatAsync.

Prerequisite PR ipfs-shipyard/net-ipfs-core#29

[Breaking]
Inherited breaking changes from IpfsShipyard.Ipfs.Core 0.2.0.
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.

[New]
Added missing IFileSystemApi.ListAsync. Doesn't fully replace the removed IFileSystemApi.ListFileAsync, but is a step in the right direction.

See also ipfs-shipyard/net-ipfs-core#29
@Arlodotexe Arlodotexe merged commit a512e36 into main Apr 3, 2024
1 check passed
@Arlodotexe Arlodotexe deleted the rel/0.2.0 branch April 3, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'file' command removed in Kubo 0.26.0
1 participant