This is motivated by issues like https://github.com/commercialhaskell/stack/issues/2618 and instances where stack mysteriously hangs because the snapshots.json file cannot be downloaded.
For (git) subprocesses the necessary machinery is already in place, it only needs to be applied where needed, maybe with a little wrapper.
For direct network access Stack.Setup.chattyDownload could be reused in a slightly generalized form. If that turns out to be too obnoxious for some usecases (like downloading the snapshots.json file), a short notice like Downloading XYZ... could suffice.
Great idea! While looking at all the spots we do downloads, it may also be valuable to revisit having an --offline flag - https://github.com/commercialhaskell/stack/issues/1594
We should also make sure that the full URL is logged (at least in debug mode). Here's an instance where it currently isn't:
~ $ stack --stack-root ~/.tmp-sr setup --resolver ghc-7.8 -v
...
2016-09-28 16:59:56.690819: [debug] Downloading /commercialhaskell/ghc/releases/download/ghc-7.8.4-release/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz
@(Network/HTTP/Download/Verified.hs:233:9)
...
I would like to be assigned to this task.
What components should I check to find git and direct network access? As far as I understand, this should be done by hand.
Doing a text search for "Network." should turn up a bunch of imports. Not all of those modules, but many, will be doing some form of network access. For the git usages, text search for "git"
Most helpful comment
Great idea! While looking at all the spots we do downloads, it may also be valuable to revisit having an --offline flag - https://github.com/commercialhaskell/stack/issues/1594