ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.24k stars 357 forks source link

display a more precise error about why sources couldnt be obtained #3707

Closed avsm closed 5 years ago

avsm commented 5 years ago

A very common error report is something of the form:

[ERROR] The sources of the following couldn't be obtained, aborting:
          - camomile.1.0.1
          - dune.1.6.2
          - lambda-term.1.13
          - react.1.2.1
          - result.1.3
          - topkg.1.0.0
          - utop.2.2.0
          - zed.1.6

It would be really useful for debugging if opam would show the underlying log for why the sources couldn't be obtained (from the stderr of wget/curl). The root cause can be anything from a network failure, to a bad checksum, to a command execution error on the local host, so more details are very useful.

Related to #3393 #3497 #3702 among others.

rjbou commented 5 years ago

On verbose mode, there is specific detailed information about why the download step fails: network, curl | wget, tar extraction, missing dependencies (e.g. bzip2), etc. and with the very verbose mode, external tools output is displayed also. We don't want as a default too much display on the output, that's why most of digging information is available on verbose & debug mode, using different levels.