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

refactor: replace futures with futures-lite #6

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire requested a review from rklaehn March 25, 2024 16:07
@dignifiedquire
Copy link
Contributor Author

@rklaehn ping

@rklaehn rklaehn merged commit 224c963 into main Apr 9, 2024
26 checks passed
@rklaehn rklaehn deleted the futures-lite branch April 9, 2024 14:35
github-merge-queue bot pushed a commit to n0-computer/iroh that referenced this pull request Apr 29, 2024
Due to the low maintenance and absurd high amount of `unsafe` code in
parts of the `futures` crate, we are trying to avoid usage of it.

Usages are replaced with

- `futures-lite` : general `Future` and `Stream` tooling
- `futures-sink`: `Sink` trait
- `futures-buffered`: faster and safer version of `Futures{Un}Ordered`
- If must be `futures-util` for sink specific things that are missing

## Breaking Changes

- `iroh::node::Node` does not implement `Future` anymore
- `iroh::node::Node::shutdown()` is now `async` and can be awaited upon
to wait for the node to exit
- `iroh_net::util::AbortingJoinHandle`s inner field is not public
anymore, use the `From<JoinHandle>` implementation to contruct it


## Followups

- [x] Apply this to `bao-tree`:
n0-computer/bao-tree#49
- [x] Apply this to `iroh-io`:
n0-computer/iroh-io#6
- [x] Apply this to `quic-rpc`:
n0-computer/quic-rpc#73

---------

Co-authored-by: Ruediger Klaehn <rklaehn@protonmail.com>
rklaehn added a commit to n0-computer/iroh-blobs that referenced this pull request Oct 22, 2024
Due to the low maintenance and absurd high amount of `unsafe` code in
parts of the `futures` crate, we are trying to avoid usage of it.

Usages are replaced with

- `futures-lite` : general `Future` and `Stream` tooling
- `futures-sink`: `Sink` trait
- `futures-buffered`: faster and safer version of `Futures{Un}Ordered`
- If must be `futures-util` for sink specific things that are missing

## Breaking Changes

- `iroh::node::Node` does not implement `Future` anymore
- `iroh::node::Node::shutdown()` is now `async` and can be awaited upon
to wait for the node to exit
- `iroh_net::util::AbortingJoinHandle`s inner field is not public
anymore, use the `From<JoinHandle>` implementation to contruct it


## Followups

- [x] Apply this to `bao-tree`:
n0-computer/bao-tree#49
- [x] Apply this to `iroh-io`:
n0-computer/iroh-io#6
- [x] Apply this to `quic-rpc`:
n0-computer/quic-rpc#73

---------

Co-authored-by: Ruediger Klaehn <rklaehn@protonmail.com>
rklaehn added a commit to n0-computer/iroh-blobs that referenced this pull request Oct 22, 2024
Due to the low maintenance and absurd high amount of `unsafe` code in
parts of the `futures` crate, we are trying to avoid usage of it.

Usages are replaced with

- `futures-lite` : general `Future` and `Stream` tooling
- `futures-sink`: `Sink` trait
- `futures-buffered`: faster and safer version of `Futures{Un}Ordered`
- If must be `futures-util` for sink specific things that are missing

## Breaking Changes

- `iroh::node::Node` does not implement `Future` anymore
- `iroh::node::Node::shutdown()` is now `async` and can be awaited upon
to wait for the node to exit
- `iroh_net::util::AbortingJoinHandle`s inner field is not public
anymore, use the `From<JoinHandle>` implementation to contruct it


## Followups

- [x] Apply this to `bao-tree`:
n0-computer/bao-tree#49
- [x] Apply this to `iroh-io`:
n0-computer/iroh-io#6
- [x] Apply this to `quic-rpc`:
n0-computer/quic-rpc#73

---------

Co-authored-by: Ruediger Klaehn <rklaehn@protonmail.com>
matheus23 pushed a commit to n0-computer/iroh-doctor that referenced this pull request Oct 22, 2024
Due to the low maintenance and absurd high amount of `unsafe` code in
parts of the `futures` crate, we are trying to avoid usage of it.

Usages are replaced with

- `futures-lite` : general `Future` and `Stream` tooling
- `futures-sink`: `Sink` trait
- `futures-buffered`: faster and safer version of `Futures{Un}Ordered`
- If must be `futures-util` for sink specific things that are missing

## Breaking Changes

- `iroh::node::Node` does not implement `Future` anymore
- `iroh::node::Node::shutdown()` is now `async` and can be awaited upon
to wait for the node to exit
- `iroh_net::util::AbortingJoinHandle`s inner field is not public
anymore, use the `From<JoinHandle>` implementation to contruct it


## Followups

- [x] Apply this to `bao-tree`:
n0-computer/bao-tree#49
- [x] Apply this to `iroh-io`:
n0-computer/iroh-io#6
- [x] Apply this to `quic-rpc`:
n0-computer/quic-rpc#73

---------

Co-authored-by: Ruediger Klaehn <rklaehn@protonmail.com>
dignifiedquire added a commit to n0-computer/iroh-gossip that referenced this pull request Oct 23, 2024
Due to the low maintenance and absurd high amount of `unsafe` code in
parts of the `futures` crate, we are trying to avoid usage of it.

Usages are replaced with

- `futures-lite` : general `Future` and `Stream` tooling
- `futures-sink`: `Sink` trait
- `futures-buffered`: faster and safer version of `Futures{Un}Ordered`
- If must be `futures-util` for sink specific things that are missing

## Breaking Changes

- `iroh::node::Node` does not implement `Future` anymore
- `iroh::node::Node::shutdown()` is now `async` and can be awaited upon
to wait for the node to exit
- `iroh_net::util::AbortingJoinHandle`s inner field is not public
anymore, use the `From<JoinHandle>` implementation to contruct it


## Followups

- [x] Apply this to `bao-tree`:
n0-computer/bao-tree#49
- [x] Apply this to `iroh-io`:
n0-computer/iroh-io#6
- [x] Apply this to `quic-rpc`:
n0-computer/quic-rpc#73

---------

Co-authored-by: Ruediger Klaehn <rklaehn@protonmail.com>
matheus23 pushed a commit to n0-computer/iroh that referenced this pull request Nov 14, 2024
Due to the low maintenance and absurd high amount of `unsafe` code in
parts of the `futures` crate, we are trying to avoid usage of it.

Usages are replaced with

- `futures-lite` : general `Future` and `Stream` tooling
- `futures-sink`: `Sink` trait
- `futures-buffered`: faster and safer version of `Futures{Un}Ordered`
- If must be `futures-util` for sink specific things that are missing

## Breaking Changes

- `iroh::node::Node` does not implement `Future` anymore
- `iroh::node::Node::shutdown()` is now `async` and can be awaited upon
to wait for the node to exit
- `iroh_net::util::AbortingJoinHandle`s inner field is not public
anymore, use the `From<JoinHandle>` implementation to contruct it


## Followups

- [x] Apply this to `bao-tree`:
n0-computer/bao-tree#49
- [x] Apply this to `iroh-io`:
n0-computer/iroh-io#6
- [x] Apply this to `quic-rpc`:
n0-computer/quic-rpc#73

---------

Co-authored-by: Ruediger Klaehn <rklaehn@protonmail.com>
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.

2 participants