Skip to content
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: Split consumer.rs file #243

Merged
merged 4 commits into from
Dec 13, 2022

Conversation

CleverAkanoa
Copy link
Collaborator

This PR aims to ease the code navigability of the consumer part.

consumer.rs involves more than 2000 lines of codes, it's quite hard to know where you are.

Even all structure are related to consumer, they can be split in more than one files.

No code has been changed, only moved and visibility opened when it was mandatory.

@KannarFr
Copy link
Contributor

KannarFr commented Dec 3, 2022

So much easier to read! <3.

@tisonkun
Copy link
Contributor

tisonkun commented Dec 4, 2022

@CleverAkanoa is this PR ready for review now?

@CleverAkanoa CleverAkanoa marked this pull request as ready for review December 4, 2022 20:33
@CleverAkanoa
Copy link
Collaborator Author

I think so :)

@tisonkun tisonkun self-requested a review December 12, 2022 02:50
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your effort! Minor comments inline.

src/consumer/message.rs Outdated Show resolved Hide resolved
src/consumer/topic.rs Outdated Show resolved Hide resolved
src/consumer/topic.rs Outdated Show resolved Hide resolved
Co-authored-by: tison <wander4096@gmail.com>
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @CleverAkanoa!

Merging...

@tisonkun tisonkun changed the title [Refactor] Split consumer.rs file refactor: Split consumer.rs file Dec 13, 2022
@tisonkun tisonkun merged commit 1999fb1 into streamnative:master Dec 13, 2022
@CleverAkanoa
Copy link
Collaborator Author

Thanks @tisonkun <3

@CleverAkanoa CleverAkanoa deleted the split_consumer branch December 13, 2022 11:42
@CleverAkanoa CleverAkanoa mentioned this pull request Dec 13, 2022
Copy link

@lukesteensen lukesteensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! I just noticed some errors when we bumped from 5.0.0 to 5.0.1 and tracked them back to this PR. Both due to using async_std when we don't have that feature active.

task::{Context, Poll},
};

use async_std::prelude::Stream;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a compile error when the async_std feature is not active.

Copy link
Contributor

@tisonkun tisonkun Jan 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use futures::Stream which is runtime agnostic. I filed a patch: #250.

time::{Duration, Instant},
};

use async_std::prelude::Stream;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants