-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.A-gitArea: anything dealing with gitArea: anything dealing with gitC-bugCategory: bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fixStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Description
Problem
The progress bar won't appear when using libcurl as git2 backend.
Actually it's an issue ofgit2-curl
. git2-curl
calls curl_easy_perform
which is synchronous, so all calls of CurlSubtransport::read
are deferred until the whole response is fed into the memory.
Ref: #9395 (comment)
Steps
- Prepare a cargo project which needs to perform some git operation (e.g. git source dependency).
- Run
HTTP_TIMEOUT=5 cargo fetch
. - The progress bar disappears while transferring data via the network.
Possible Solution(s)
Modify git2-curl
int a streaming manner.
Notes
This issue is just for record. I'll send a PR to git2-rs after figuring out a reasonable way to perform a stream read.
Output of cargo version
:
cargo 1.51.0 (43b129a20 2021-03-16)
release: 1.51.0
commit-hash: 43b129a20fbf1ede0df411396ccf0c024bf34134
commit-date: 2021-03-16
Metadata
Metadata
Assignees
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.A-gitArea: anything dealing with gitArea: anything dealing with gitC-bugCategory: bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fixStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix