How can I test a new ghc build against stackage

这一生的挚爱 提交于 2019-12-12 13:29:23

问题


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:


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



来源:https://stackoverflow.com/questions/35323714/how-can-i-test-a-new-ghc-build-against-stackage

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!