Skip to content

Rename the HttpBody export to Body #2839

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

Closed
Tracked by #2345
seanmonstar opened this issue May 20, 2022 · 8 comments · Fixed by #2969
Closed
Tracked by #2345

Rename the HttpBody export to Body #2839

seanmonstar opened this issue May 20, 2022 · 8 comments · Fixed by #2969
Labels
A-body Area: body streaming. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Milestone

Comments

@seanmonstar
Copy link
Member

When the concrete Body struct is removed, we can export the http_body::Body trait as just Body.

@seanmonstar seanmonstar added E-easy Effort: easy. A task that would be a great starting point for a new contributor. C-feature Category: feature. This is adding a new feature. A-body Area: body streaming. labels May 20, 2022
@seanmonstar seanmonstar added this to the 1.0 milestone May 20, 2022
@yuri-potatoq
Copy link

What would be the advantage in case of import both trait and struct?

@seanmonstar
Copy link
Member Author

The struct will be removed, as detailed in #2345.

@seanmonstar seanmonstar moved this to Todo in hyper 1.0 Jun 15, 2022
@RajivTS
Copy link
Contributor

RajivTS commented Aug 20, 2022

I am just starting up with Hyper so would like to work on this task (if that's ok). By renaming and exporting the http_body::Body trait as just Body, I assume you are talking about updating the following:

hyper/src/body/mod.rs

Lines 19 to 23 in 84f6ae7

pub use http_body::Body as HttpBody;
pub use http_body::SizeHint;
pub use self::aggregate::aggregate;
pub use self::body::{Body, Sender};

But since the concrete Body type is already exported as Body, wouldn't that cause a conflict? Should I get rid of the concrete type export?

@seanmonstar
Copy link
Member Author

Yes, we'd need to finish removing parts of Body, and renaming that. Then this one would be straightforward.

@RajivTS
Copy link
Contributor

RajivTS commented Aug 20, 2022

Is there a separate task that I can work on to remove parts of Body?

@seanmonstar seanmonstar moved this from Todo to Blocked in hyper 1.0 Aug 22, 2022
@seanmonstar
Copy link
Member Author

@RajivTS The top comment in #2345 includes a list of tasks, and I tried to put them in order of unblocking the next one. Some are linked to specific issues, we can make more of them issues too.

Michael-J-Ward added a commit to Michael-J-Ward/hyper that referenced this issue Aug 25, 2022
"""
We'll eventually want to bikshed the name Recv, but to free up the name Body for hyperium#2839, this can be done quickly.
"""

Resolve hyperium#2963
Michael-J-Ward added a commit to Michael-J-Ward/hyper that referenced this issue Aug 25, 2022
"""
We'll eventually want to bikshed the name Recv, but to free up the name Body for hyperium#2839, this can be done quickly.
"""

Resolve hyperium#2963
Michael-J-Ward added a commit to Michael-J-Ward/hyper that referenced this issue Aug 25, 2022
"""
We'll eventually want to bikshed the name Recv, but to free up the name Body for hyperium#2839, this can be done quickly.
"""

Resolve hyperium#2963
Michael-J-Ward added a commit to Michael-J-Ward/hyper that referenced this issue Aug 26, 2022
"""
We'll eventually want to bikshed the name Recv, but to free up the name Body for hyperium#2839, this can be done quickly.
"""

Resolve hyperium#2963
seanmonstar pushed a commit that referenced this issue Aug 26, 2022
"""
We'll eventually want to bikshed the name Recv, but to free up the name Body for #2839, this can be done quickly.
"""

Closes #2963
@seanmonstar seanmonstar moved this from Blocked to Todo in hyper 1.0 Aug 26, 2022
@seanmonstar
Copy link
Member Author

This is no longer blocked, since Body was renamed to Recv as a stop-gap (#2963).

RajivTS added a commit to RajivTS/hyper that referenced this issue Aug 28, 2022
Now that the concrete `Body` type has been temporarily replaced with `Recv` in hyperium#2966,
we can rename and export `http_body::Body` as just `Body` instead of `HttpBody`.

Closes hyperium#2839
@RajivTS
Copy link
Contributor

RajivTS commented Aug 28, 2022

@seanmonstar Created PR to address this, would appreciate a review to understand if I missed something.

RajivTS added a commit to RajivTS/hyper that referenced this issue Aug 29, 2022
Now that the concrete `Body` type has been temporarily replaced with `Recv` in hyperium#2966,
we can rename and export `http_body::Body` as just `Body` instead of `HttpBody`.

Closes hyperium#2839
@seanmonstar seanmonstar moved this from Todo to In Progress in hyper 1.0 Aug 29, 2022
seanmonstar pushed a commit to RajivTS/hyper that referenced this issue Aug 29, 2022
Now that the concrete `Body` type has been temporarily replaced with `Recv` in hyperium#2966,
we can rename and export `http_body::Body` as just `Body` instead of `HttpBody`.

Closes hyperium#2839
Repository owner moved this from In Progress to Done in hyper 1.0 Aug 30, 2022
seanmonstar pushed a commit that referenced this issue Aug 30, 2022
Now that the concrete `Body` type has been temporarily replaced with `Recv` in #2966,
we can rename and export `http_body::Body` as just `Body` instead of `HttpBody`.

Closes #2839

BREAKING CHANGE: The trait has been renamed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-body Area: body streaming. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants