Uh oh!
There was an error while loading. Please reload this page.
Drop dep tokio's io-util feat as it broke MSRV and isn't useful - #2537
Merged
TheBlueMatt merged 2 commits intoAug 29, 2023
Merged
Conversation
TheBlueMatt
commented
Aug 28, 2023
CollaboratorAuthor
Oops, also had to test-only pin |
jkczyz
commented
Aug 28, 2023
Contributor
CI still unhappy 😭 |
Uh oh!
There was an error while loading. Please reload this page.
TheBlueMatt
commented
Aug 28, 2023
CollaboratorAuthor
TheBlueMattforce-pushed
the
2023-08-one-less-feature-dep
branch
from
August 28, 2023 21:07
1046f33 to
97b6c6fCompareTheBlueMatt
commented
Aug 28, 2023
CollaboratorAuthor
In any case, IMO we should still land this while we work through |
wpaulino
commented
Aug 28, 2023
Contributor
Feel free to squash, LGTM |
jkczyz
reviewed
Aug 28, 2023
Uh oh!
There was an error while loading. Please reload this page.
We use `tokio`'s `io-util` feature to provide the
`Async{Read,Write}Ext` traits, which allow us to simply launch a
read future or `poll_write` directly as well as `split` the
`TcpStream` into a read/write half. However, these traits aren't
actually doing much for us - they are really just wrapping the
`readable` future (which we can trivially use ourselves) and
`poll_write` isn't doing anything for us that `poll_write_ready`
can't.
Similarly, the split logic is actually just `Arc`ing the
`TcpStream` and busy-waiting when an operation is busy to prevent
concurrent reads/writes. However, there's no reason to prevent
concurrent access at the stream level - we aren't ever concurrently
writing or reading (though we may concurrently read and write,
which is fine).
Worse, the `io-util` feature broke MSRV (though they're likely to
fix this upstream) and carries two additional dependencies (only
one on the latest upstream tokio).
Thus, we simply drop the dependency here.
Fixeslightningdevkit#2527.TheBlueMattforce-pushed
the
2023-08-one-less-feature-dep
branch
from
August 28, 2023 21:16
97b6c6f to
afc5a02CompareTheBlueMatt
commented
Aug 28, 2023
CollaboratorAuthor
Squashed with the one extra space removed: |
wpaulino
approved these changes
Aug 28, 2023
jkczyz
approved these changes
Aug 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We use
tokio'sio-utilfeature to provide theAsync{Read,Write}Exttraits, which allow us to simply launch a read future orpoll_writedirectly as well assplittheTcpStreaminto a read/write half. However, these traits aren't actually doing much for us - they are really just wrapping thereadablefuture (which we can trivially use ourselves) andpoll_writeisn't doing anything for us thatpoll_write_readycan't.Similarly, the split logic is actually just
Arcing theTcpStreamand busy-waiting when an operation is busy to prevent concurrent reads/writes. However, there's no reason to prevent concurrent access at the stream level - we aren't ever concurrently writing or reading (though we may concurrently read and write, which is fine).Worse, the
io-utilfeature broke MSRV (though they're likely to fix this upstream) and carries two additional dependencies (only one on the latest upstream tokio).Thus, we simply drop the dependency here.
Fixes#2527.