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

cabal update with unreachable http_proxy yields unhelpful cabal: does not exist #1962

Closed
nomeata opened this issue Jun 25, 2014 · 4 comments · Fixed by #2560
Closed

cabal update with unreachable http_proxy yields unhelpful cabal: does not exist #1962

nomeata opened this issue Jun 25, 2014 · 4 comments · Fixed by #2560

Comments

@nomeata
Copy link
Contributor

nomeata commented Jun 25, 2014

In order to avoid #1602 I upgraded HTTP to version 4000.2.17. But I noticed a new (minor) problem: If the proxy mentioned in http_proxy is down, I get

(sid)root@kirk:~# unset http_proxy
(sid)root@kirk:~#  cabal update
Downloading the latest package list from hackage.haskell.org
(sid)root@kirk:~# export http_proxy=http://localhost:3128/
(sid)root@kirk:~#  cabal update
Downloading the latest package list from hackage.haskell.org
cabal: does not exist
# now starting the proxy
(sid)root@kirk:~#  cabal update
Downloading the latest package list from hackage.haskell.org

Certainly the error message could be more helpful.

@23Skidoo
Copy link
Member

Isn't this a problem in HTTP's error reporting? E.g. if I set HTTP_PROXY to foo, I get a decent error message:

$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal: openTCPConnection: host lookup failure for "foo"

@ttuegel
Copy link
Member

ttuegel commented Apr 24, 2015

@23Skidoo Did you intend to re-open this?

@23Skidoo
Copy link
Member

Apparently I reverted that commit. IIRC I didn't like how that patch replaced all possible HTTP error messages (which can be quite useful, as in example above) with "Cannot connect to uri. Is http_proxy set?". Should be easy to fix by just re-raising the exception.

@23Skidoo
Copy link
Member

Hmm, looks like it only handles DoesNotExistError. Maybe I just wanted to improve the patch a bit and then forgot about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants