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

please add a resolver for ghc-9.2.3 #5761

Closed
shayne-fletcher opened this issue Jun 1, 2022 · 5 comments
Closed

please add a resolver for ghc-9.2.3 #5761

shayne-fletcher opened this issue Jun 1, 2022 · 5 comments

Comments

@shayne-fletcher
Copy link

stack setup --resolver ghc-9.2.3
Stack has not been tested with GHC versions above 9.0, and using 9.2.3, this may fail
No setup information found for ghc-9.2.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'macosx'.
Supported versions: ghc-7.8.4, ghc-7.10.1, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.1, ghc-8.4.2, ghc-8.4.3, ghc-8.4.4, ghc-8.6.1, ghc-8.6.2, ghc-8.6.3, ghc-8.6.4, ghc-8.6.5, ghc-8.8.1, ghc-8.8.2, ghc-8.8.3, ghc-8.8.4, ghc-8.10.1, ghc-8.10.2, ghc-8.10.3, ghc-8.10.4, ghc-8.10.5, ghc-8.10.6, ghc-8.10.7, ghc-9.0.1, ghc-9.0.2, ghc-9.2.1, ghc-9.2.2
@mpilgrem
Copy link
Member

mpilgrem commented Jun 3, 2022

stack, by default, looks at https://github.com/commercialhaskell/stackage-content/blob/master/stack/stack-setup-2.yaml for this information. An issue has been opened in that respository: commercialhaskell/stackage-content#103

@mpilgrem
Copy link
Member

mpilgrem commented Jun 3, 2022

If you cannot wait, I think you can do something like this:

  1. Create your own local stack setup YAML file. I am on Windows 64, so I created something like this, named my-stack-setup.yaml:
ghc:
  windows64:
    9.2.3:
      url: "http://downloads.haskell.org/~ghc/9.2.3/ghc-9.2.3-x86_64-unknown-mingw32.tar.xz"
      content-length: 504613996
      sha1: 0c3ea029fb9b9c6a0ceeee453d76b2ec474eb25c
      sha256: 0543d80c1ef453a5f82d0a2bc436f93d2feb3d5855114c8a78a12c561c9bc8df

sevenzexe-info:
  url: "https://github.com/fpco/minghc/blob/master/bin/7z.exe?raw=true"
  content-length: 73728
  sha1: 187dff8a3327da87050f678579816e5bae40c632

sevenzdll-info:
  url: "https://github.com/fpco/minghc/blob/master/bin/7z.dll?raw=true"
  content-length: 447488
  sha1: 168a288d4456f0473f66e86a2d6fec4eb6f4b993

I took the URL from this site: https://www.haskell.org/ghc/download_ghc_9_2_3.html#binaries. I downloaded the file to see what size it was in bytes (content-length) and (in PowerShell) used the tool (Get-FileHash ghc-9.2.3-x86_64-unknown-mingw32.tar.xz -Algorithm SHA256).Hash.ToLower() to get the file's hash (sha256) - and similarly for sha1.

I took the sevenzexe-info and sevenzdll-info verbatim from https://github.com/commercialhaskell/stackage-content/blob/master/stack/stack-setup-2.yaml. stack needs these, or it will not unzip the downloaded GHC - even if 7-Zip is already in place.

  1. Build a simple test program that has resolver: ghc-9.2.3 in its stack.yaml file, with stack --setup-info-yaml=my-stack-setup.yaml build`. This will set off the download and installation of GHC 9.2.3.

  2. Once GHC 9.2.3 is installed where stack expects to find it, there is no longer any need for --setup-info-yaml=my-stack-setup.yaml on the command line.

@shayne-fletcher
Copy link
Author

@mpilgrem this is awesome information, thanks so much mike! ok, so i was able to use this to get some local testing going and that enables me to make progress while we wait on commercialhaskell/stackage-content#103 and i get CI builds going at this version. i'll close this ticket. thanks!!

@shayne-fletcher
Copy link
Author

oh, just for completeness, i wrote stack-setup-2-ghc-9.2.3.yaml with contents

ghc:
  macosx:
    9.2.3:
      url: http://downloads.haskell.org/~ghc/9.2.3/ghc-9.2.3-x86_64-apple-darwin.tar.bz2
      content-length: 279717482
      sha1: 213391478ba6bf7cc81c89a2959360e58b811c54
      sha256: f6803356d2ddb4ad3d68372bf23ef61d2a9bc670c099086319f2bee96c457a0a

and used it to install ghc-9.2.3 via,

stack --setup-info-yaml stack-setup-2-ghc-9.2.3.yaml --resolver ghc-9.2.3 setup

@andreasabel
Copy link

nightly-2022-06-10 has GHC 9.2.3.

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

3 participants