How can I test a new ghc build against stackage

668 views Asked by At

I've built ghc-HEAD and I want to try building all of a stackage lts or nightly to see how much it can do.

Nothing I say can convince stack to build anything using my new ghc. I try setting up like:

stack setup 8.1.20160209 --ghc-variant=aarch64-HEAD --ghc-bindist=https://s3-us-west-1.amazonaws.com/stack-aarch64/ghc-8.1.20160209-aarch64-unknown-linux.tar.xz

And then I download an lts config.cabal and copy all of the packages into my.cabal file. This is all that's necessary to build everything with a regular ghc. I say

stack install --ghc-variant=aarch64-HEAD

And it tells me it has no idea where any of these packages are. Try stack solver. So I try that and it gives up after a long time too.

Next I try to make a custom snapshot, again just putting all the packages in a snapshot.yaml and pointing stack.yaml at it. In stack.yaml:

resolver:
  name: my-snapshot
  location: "./my-snapshot.yaml"
...

In my-snapshot.yaml:

compiler: ghc-8.1.20160209

packages:
  - accelerate-0.15.1.0
  - ace-0.6
...

That doesn't work either. So I try negotiating with stack.yaml

   skip-ghc-check: true
    compiler: ghc-8.1.20160209

    ghc-variant: aarch64-HEAD

    setup-info:
      ghc:
        aarch64-HEAD:
          8.1.20160209:
            url: "https://s3-us-west-1.amazonaws.com/stack-aarch64/ghc-8.1.20160209-aarch64-unknown-linux.tar.xz"

    install-ghc: true
    allow-newer: true

And now stack install says:

The following package identifiers were not found in your indices: bin-package-db-0.0.0.0
1

There are 1 answers

0
mgsloan On

So I try that and it gives up after a long time too.

What do you mean by "gives up"? What's the output?

That doesn't work either

What do you mean by "doesn't work"? What's the output?

stack install --ghc-variant=aarch64-HEAD

What are you stack installing? You need to specify a resolver, and in this case, a compiler version - specifying just --ghc-variant is not enough. You need something like stack install --allow-newer --ghc-variant=aarch64-HEAD --compiler ghc-8.1.20160209. Unfortunately, at the moment that probably won't work due to https://github.com/commercialhaskell/stack/issues/1579

Custom snapshots is one way to go about this, but you will need to list the exact version of every package you want.

I'm not sure where that bin-package-db error comes from, sorry