-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make spawn builder harder to misuse #83
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.
Nice! I have just some little docstrings suggestions.
Can you please pre-test this by using this branch in portal
, and opening the required changes as a draft PR? To see the effect. Or maybe this doesn't require any portal
changes?
Please let me know how to navigate the upgrade process. I only bumped the Cargo version but we'll also have to publish this, possibly prepare a changelog, etc.
I usually just use cargo-release
. Let's pair on releasing the version once this is merged. Bumping the version in this PR is correct IMO (otherwise we could forget this is semver-breaking change).
Co-authored-by: Matěj Laitl <[email protected]>
Thanks, looking good, I applied all the suggestions.
It does require changes, here's the PR: https://github.com/tonarino/portal/pull/3333
Nice, let's do that. |
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.
LGTM! The changes make sense to me, I just have a small comment on one of the examples.
benches/pub_sub.rs
Outdated
@@ -4,7 +4,7 @@ use std::time::{Duration, Instant}; | |||
use tonari_actor::{Actor, Context, Event, Recipient, System}; | |||
|
|||
#[derive(Debug, Clone)] | |||
struct StringEvent(String); | |||
struct StringEvent(()); |
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.
Was this change due to a clippy warning? If so and we just want a unit struct, then maybe just struct ActorEvent;
is enough. A tuple struct with just the unit type seems a bit strange.
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.
Yeah, it's because of clippy. Will fix.
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.
LGTM! Just one unrelated change request for the fix clippy part. Conditionally approving already.
@strohel Please let me know when you can spare a minute to release this with me, thanks! |
This is a follow-up to #82 to make it a hard error when the user forgets to provide an address to an actor.
This breaks the API because now one has to call
.with_default_capacity()
if they really don't want to provide or configure the address.Please let me know how to navigate the upgrade process. I only bumped the Cargo version but we'll also have to publish this, possibly prepare a changelog, etc.