-
Notifications
You must be signed in to change notification settings - Fork 165
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(iroh): Modularize protocol #2454
Merged
Merged
Conversation
This file contains 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
Also a sizes test, just so we know where the bytes go...
rklaehn
force-pushed
the
modularize-protocol
branch
from
July 3, 2024 15:12
d722f76
to
225ea91
Compare
rklaehn
force-pushed
the
modularize-protocol
branch
from
July 3, 2024 17:23
369e37f
to
e519d0f
Compare
There is a second thing we may or may not want to do: we might want to make the individual subsystem protocols self-contained so that they reexport all the things they need. But I would prefer to do this in a subsequent PR since this one is big enough as it is. |
dignifiedquire
approved these changes
Jul 4, 2024
matheus23
pushed a commit
that referenced
this pull request
Nov 14, 2024
## Description Use a newly created macro crate https://github.com/n0-computer/nested-enum-utils to allow for from/to conversions for deeply nested enums. This allows us to split the protocol enum into multiple parts without changing anything about the basic concept of how things are handled. ## Breaking Changes Weirdly, I think there should be none since the protocol is private. ## Notes & open questions Obvious next steps would be - [x] define the subsystem specific messages in submodules - [x] publish the macro crate - [x] (maybe) split up the handling of the different subsystems - [x] (maybe) remove the subsystem prefixes from the messages Not so obvious next steps (maybe next PR) - Allow moving the subsystem protocols to different crates. This is difficult because you can not set the target when generating the conversions. ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
Sign up for free
to 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.
Description
Use a newly created macro crate https://github.com/n0-computer/nested-enum-utils to allow for from/to conversions for deeply nested enums.
This allows us to split the protocol enum into multiple parts without changing anything about the basic concept of how things are handled.
Breaking Changes
Weirdly, I think there should be none since the protocol is private.
Notes & open questions
Obvious next steps would be
Not so obvious next steps (maybe next PR)
Change checklist