Skip to content

rfc(pkg): progress indicator for downloads #8840

@Alizter

Description

@Alizter

Problem

When we do:

dune pkg lock

it typically take some time because we are fetching or cloning in the background.

Proposal

We could have a download indicator that looks like the following:

[0.1/5.2 MiB] <spinny thing> Downloading opam-repository https://opam.ocaml.org

This would give users a much better experience when waiting.

Implementation

We use opam libraries to fetch and clone repos. We could modify the calls to git by parsing from git fetch and git clone:

--progress
           Progress status is reported on the standard error stream by default when
           it is attached to a terminal, unless -q is specified. This flag forces
           progress status even if the standard error stream is not directed to a
           terminal.

When we have these we then parse and display a nice status.

Related PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    package managementproposalRFC's that are awaiting discussion to be accepted or rejected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions