-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Replace usage of reqwest
with hyper
#990
Comments
I'd like to give this a shot. Can you assign it to me please? |
@rossgardt hi! It's yours, let me know if you need any help :) |
@rossgardt any update on this? :) |
Hi. I had some issues in the beginning, but now it looks like it is finally working. Will give you the next update by the end of the week. |
@rossgardt Great! Let me know if you have any questions, I am happy to help. :) |
@LucioFranco sorry, I was sick throughout the week. Made some progress today. let https_client = hyper::Client::builder()
.build::<_, hyper::Body>(https_conn);
let client = SyncClientBuilder::new()
.http_client(https_client)
...
|
@rossgardt any update on this? Anything we can help with? Could you let us know if you don't plan on making this change (which is fine 😄 ), and we can get someone on the team to do this. |
I noticed |
@MOZGIII I believe most of them should be possible to be used without reqwest. |
I actually have a list of all of the ones that rely on
That's it, we only have two, but both are problematic, in a sense that we can't simply enable a feature to use bare |
Yeah, I have an issue open for kube-rs to move to tower but have not had time to work on it. Those also should be decently trivial to vendor code instead of trying to contribute for now. |
@rossgardt any update on this? Otherwise, we can reassign. Thanks! |
I checked For removing it here sink build function should be async or Also I found that some test have not trivial |
Yes we have some sink build functions that do sync requests and can block the build process. The proper solution is to make build async, but that could end up being quite invasive. The |
Continuation from #2782 (comment) @fanatid let's move that conversation here. So I agree with the opening comment that less dependency is better, even in tests, and yes some of it's dependencies would need to be added directly. Although I don't know at this point how many. @fanatid do you have some idea which one would we need to add? But no matter how much transitive dependencies we add, we would still remove quite the amount of code from the build. Although API surface on which we would depend could increase, for that reason we could pick a few representative tests and try it out. Regarding
with which we would also remove one more dependency. |
I do not have exact names of crates which will need to be added, but when I started removing |
This is not an issue that we should consider vital. The overall idea to reduce our dependency count is a good one, but if we are legitimately using features of the crate that we'd have to pull in or reimplement then this is likely not worth the effort. There's also a decent chance that reqwest is already somewhere else in our dependency tree. |
I agree. @ktff if you agree feel free to close this. |
After some investigation, it stands:
So, yes, as @lukesteensen said, this is not worth the effort, gains are marginal at best. |
Thanks for the update. That sounds good to me. |
Currently, we pull in
reqwest
for tests in a couple of places but we already pull inhyper
andhttp
. So I think it would make sense to remove this additional dependency to reduce compile times and the number of dependencies we require during tests.The text was updated successfully, but these errors were encountered: