-
Notifications
You must be signed in to change notification settings - Fork 997
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
chore: deprecate void
crate
#5676
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, and thanks for this! ❤️
Might want to update the EDIT: And changelogs |
CC @hanabi1224 @jxs |
Thanks for the reminding Darius, and I am sorry I didn't state explicitly why I moved ahead without asking for it. Edit: |
## Description <!-- Please write a summary of your changes and why you made them. This section will appear as the commit message after merging. Please craft it accordingly. For a quick primer on good commit messages, check out this blog post: https://cbea.ms/git-commit/ Please include any relevant issues in here, for example: Related https://github.com/libp2p/rust-libp2p/issues/ABCD. Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ. --> This PR bumps crate versions and add changelog entries for crates that are changed in #5676 Question: When should a crate version bump in the current release process? Should it be right before or right after publishing? I see most of current crate versions are published while some are not (e.g. libp2p-autonat@0.13.1 libp2p-gossisub@0.48.0 and libp2p-perf@0.4.0 etc.) ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR which don't need to go into the final commit message. --> ## Change checklist <!-- Please add a Changelog entry in the appropriate crates and bump the crate versions if needed. See <https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>--> - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [x] A changelog entry has been made in the appropriate crates --------- Co-authored-by: João Oliveira <hello@jxs.pt> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Description <!-- Please write a summary of your changes and why you made them. This section will appear as the commit message after merging. Please craft it accordingly. For a quick primer on good commit messages, check out this blog post: https://cbea.ms/git-commit/ Please include any relevant issues in here, for example: Related https://github.com/libp2p/rust-libp2p/issues/ABCD. Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ. --> The `void` crate provides a `Void` type that is conceptually equivalent to the [`never` type(!)](https://doc.rust-lang.org/std/primitive.never.html). This PR tries to remove `void` crate from the dependency tree by replacing `void::Void` with [`std::convert::Infallible`](https://doc.rust-lang.org/std/convert/enum.Infallible.html) that will eventually become an alias of the `never` type(!) > This enum has the same role as [the ! “never” type](https://doc.rust-lang.org/std/primitive.never.html), which is unstable in this version of Rust. When ! is stabilized, we plan to make Infallible a type alias to it: ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR which don't need to go into the final commit message. --> ## Change checklist <!-- Please add a Changelog entry in the appropriate crates and bump the crate versions if needed. See <https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>--> - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] A changelog entry has been made in the appropriate crates
…p2p#5678) ## Description <!-- Please write a summary of your changes and why you made them. This section will appear as the commit message after merging. Please craft it accordingly. For a quick primer on good commit messages, check out this blog post: https://cbea.ms/git-commit/ Please include any relevant issues in here, for example: Related https://github.com/libp2p/rust-libp2p/issues/ABCD. Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ. --> This PR bumps crate versions and add changelog entries for crates that are changed in libp2p#5676 Question: When should a crate version bump in the current release process? Should it be right before or right after publishing? I see most of current crate versions are published while some are not (e.g. libp2p-autonat@0.13.1 libp2p-gossisub@0.48.0 and libp2p-perf@0.4.0 etc.) ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR which don't need to go into the final commit message. --> ## Change checklist <!-- Please add a Changelog entry in the appropriate crates and bump the crate versions if needed. See <https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>--> - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [x] A changelog entry has been made in the appropriate crates --------- Co-authored-by: João Oliveira <hello@jxs.pt> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
By switching from `void::Void` to `std::convert::Infallible`, #5676 changed the output types of some `NetworkBehavior` implementations in different protocols. This can cause a type mismatch for the user and therefore is a breaking change. #5678 (follow-up PR that version-bumped the crates affected by #5676) only bumped the patch version of the affected crates. The current PR now changes it to a minor version bump for all crates where types in a `NetworkBehavior` implementation were affected. It also reverts the version bump and CHANGELOG entry in `libp2p-quic` that was added with #5678, because that crate was never touched by the original PR. Pull-Request: #5811.
Description
The
void
crate provides aVoid
type that is conceptually equivalent to thenever
type(!). This PR tries to removevoid
crate from the dependency tree by replacingvoid::Void
withstd::convert::Infallible
that will eventually become an alias of thenever
type(!)Notes & open questions
Change checklist