Skip to content
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

[git2-curl] The progress bar won't appear when using libcurl as git2 backend #9444

Open
weihanglo opened this issue May 1, 2021 · 0 comments
Labels
A-console-output Area: Terminal output, colors, progress bar, etc. A-git Area: anything dealing with git C-bug Category: bug S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Comments

@weihanglo
Copy link
Member

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

  1. Prepare a cargo project which needs to perform some git operation (e.g. git source dependency).
  2. Run HTTP_TIMEOUT=5 cargo fetch.
  3. 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
@weihanglo weihanglo added the C-bug Category: bug label May 1, 2021
@ehuss ehuss added A-external-dependencies Area: dependencies on things outside of cargo A-git Area: anything dealing with git A-console-output Area: Terminal output, colors, progress bar, etc. labels May 20, 2021
@weihanglo weihanglo added S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix and removed A-external-dependencies Area: dependencies on things outside of cargo labels Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-console-output Area: Terminal output, colors, progress bar, etc. A-git Area: anything dealing with git C-bug Category: bug S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Projects
None yet
Development

No branches or pull requests

2 participants