-
Notifications
You must be signed in to change notification settings - Fork 149
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
Migrate to 2018 edition #292
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.
Thanks! I have one concern wrt url handling (inline comment). Also could you merge with master to fix CI tests?
The purpose of this PR is to reduce the time of Maybe we should query local registry index rather than query HTTP API? I'd like to handle this. |
I see. Does it help though, we still make the same amount of requests?
I think we should eventually use cargo offline mode |
Less connection with less TCP handshake, that's do helpful, especially if the network is bad. But, never mind, you shouldn't spend too much effort on my special situation.
I am not very familiar with Cargo's offline mode. My current idea is to use the SourceConfigMap#load in the cargo crate to get the Source and use the query method to get all versions of a crate. Of cause, update index in the begin. But temporarily I don't known how to support the alternate registry |
@DCjanus could you open a separate issue for querying local registry index/offline mode? Note, that we don't want to depend on cargo as a lib (because it's huge), but instead the plan is to eventually integrate |
Thanks for your help! |
bors r+ |
292: Migrate to 2018 edition r=ordian a=DCjanus There was function `get_with_timeout`, re-create a client each time this function is called, and "timeout" always 'default', I merged these two functions and reuse reqwest::Client to reuse TCP connection. Other mirror change: + move to 2018 edition + work with rustfmt Recommended review way: commit by commit. Co-authored-by: DCjanus <dcjanus@dcjanus.com>
There was function
get_with_timeout
, re-create a client each time this function is called, and "timeout" always 'default', I merged these two functions and reuse reqwest::Client to reuse TCP connection.Other mirror change:
Recommended review way: commit by commit.