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

Stack setup fails when stack needs upgrading #300

Open
odcameron opened this issue Oct 6, 2022 · 2 comments
Open

Stack setup fails when stack needs upgrading #300

odcameron opened this issue Oct 6, 2022 · 2 comments

Comments

@odcameron
Copy link

When first installing Haskell-Vim-Now I encountered the following error:

Setting up GHC if needed...
Stack setup failed with exit code: 1
stderr: RedownloadInvalidResponse Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/fpco/lts-haskell/master//lts-19.11.yaml"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}

The error was caused by an older version of stack which requested to download from an outdated Github URL ("raw.githubusercontent.com/fpco/lts-haskell/master//lts-19.11.yaml").
Upon executing ..$ sudo stack upgrade then reattempting to install (..$ bash /tmp/haskell-vim-now.sh) the installation proceeded with success.

Recommend adding something like the following lines in the "setup_haskell.hs" file just before msg "Setting up GHC if needed...:

msg "   Upgrading stack if needed"
Turtle.procStrict "stack" ["upgrade"]  $  pure (Turtle.unsafeTextToLine "y") 
@begriffs
Copy link
Owner

begriffs commented Oct 6, 2022 via email

@odcameron
Copy link
Author

Thanks @begriffs , I will get back to you after I have a chance to test.
And you make a fair point about automatically upgrading Stack: I know several Haskell packages are quite sensitive to which version of GHC is being used (is this the issue which causes "Cabal Hell"?) and upgrading my Stack did change to GHC version which Stack tried to install.
As such, would you support an interactive installer confirmation (ie. not passing "y" automatically but asking the user)?

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

No branches or pull requests

2 participants