-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(client, server): remove the tcp
cargo feature and related code
#2878
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
Conversation
remove all tcp feature gated code in the server module partially closes hyperium#2856
removes the examples for Builder::serve and Server::with_graceful_shutdown which are failing after the Server::bind is removed partially closes hyperium#2856
remove client code that depends on tcp features. Also removes several tests and doc examples that are broken without the tcp feature partially closes hyperium#2856
remove the tcp feature from Cargo.toml partially closes hyperium#2856
Woah, awesome work, thanks! |
remove unused types from the client connect module and fix unused import warnings
It should be noted that this change currently breaks pretty much every test and example, which all rely on the Server/Client type. |
Alright, the meta pieces are in place now, so full-speed ahead on the feature work... Hm, it looks like we'll need some sort of local utility for the unit tests... |
Yes, I think all tcp feature code is gone now. I've been working on converting the tests to use conn client/server mod, but I'm not quite happy with it. The examples also pose a similar problem. |
I'm looking through the tests right now, and it seems like a good time to clean up this mess anyways 😅 . Most of the client ... As I scroll more, I'm not sure there's many tests that are checking the higher-level |
add the `net` feature to `tokio` dependencies. Replace all usages of Server and Client with locally created types implemented using TcpListener/TcpStream and the server/client conn module
Aww, sorry, it looks like merging #2896 caused conflicts with this 🙈 |
That's fine, I'll have to update the examples anyways before this works. |
When we merge this PR, will |
I think you have an argument there to replace |
update examples to remove usage of `tcp`-dependant types (`Server`/`Client`) and replace them with the client/server `conn` modules
remove usage of Server and Client types from the web_api example
All tests except |
Thanks for plugging away at this! I'll kick off another CI run. |
I believe it should finally pass now. |
Looks like a test or benchmark needs to be updated. I know this has grown big, if you want to just comment out the tests that are failing with a |
Yeah, I totally forgot that nightly and benches exist. I can probably rewrite them, but I'd need some more time for that. If the PR is blocking other changes I can of course comment out the benches and add them in later again. |
There's some other items that are somewhat separate, but I think they will cause merge conflicts with this, so getting it merged sooner than later will probably mean less pain. For instance, I was about to start deleting |
Alright, I will just comment them out for now I guess, might be able to add them in later in another PR or work on some other changes then. |
Thanks for taking this so far! I've squashed and fixed up the last couple conflicts and merged in #2929. |
Removes the
tcp
cargo feature and related code from server and client. I've keptclient::connect
even thought it doesn't serve much use without tcp-related features.Closes #2856.