-
Notifications
You must be signed in to change notification settings - Fork 33
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
Re-flatten crate structure and get rid of PushService trait #331
Conversation
This is a first step to refactor PushService and split the push_service.rs file in many smaller parts.
8295bc8
to
cfd566b
Compare
## Feature flags for libsignal-service | ||
|
||
| Feature flag | Description | | ||
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `unsend-futures` | This feature removes the `Send` requirement on returned futures. Enabling this flag may be necessary for interoperability with other libraries that don't support `Send` such as actix. | | ||
|
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.
I'm not sure whether WF will be compatible for now without the Unsend feature.
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.
Ah, I can definitely check that. It was my understanding that this was only for libsignal-service-actix
. I'll double check.
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.
with whisperfish/whisperfish@e93ed19 I can confirm my initial suspicion, we can remove unsend-futures
.
Checking whisperfish v0.6.0-dev (/Users/gferon/Developer/signal/whisperfish/whisperfish)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.52s
Co-authored-by: Ruben De Smet <[email protected]>
Since the actix implementation is not used anymore, and makes changes to the HTTP layer harder, I'm suggesting this big refactoring. No logic has changed, and this is a pure copy-pasta from the contents of
libsignal-service-hyper
.Among the benefits stand out:
async_trait
(and static dispatch)http
types instead of having our own (weak) abstraction layerThis is a first step to refactor
PushService
and split thepush_service.rs
file in many smaller (and more readable) parts.We can also start exposing different basic feature flags for toggling the TLS layer (maybe it is interesting to
whisperfish
to use OpenSSL?).You can see the type of necessary changes downstream to
whisperfish
orpresage
(not that many) - whisperfish/presage#272