Closed swiftvimla closed 5 years ago
Yes, the resolver seems to be a problem. I've had to clone all the lambdacube repos (gl/ir/compiler) and fiddle with the project settings to make them jive with GHC 8.
Thanks for the quick reply!
You do not have to clone the repositories to use lambdacube libraries with GHC 8.
The only thing you need is a local stack.yaml
for your GHC 8 project just like lambdacube-quake3 does and refer the required lambdacube github repositories.
https://github.com/lambdacube3d/lambdacube-quake3/blob/master/stack.yaml#L10-L22
What is the problem with this method?
It should not be an overhead. I guess your project has a stack.yaml
also just like lambdacube-quake3.
It does have a stack.yaml
file. I believe I tried your approach initially (a few days ago). Ran into an issue with stack not being able to handle archives properly.
Archive extraction failed. Tarballs and zip archives are supported, couldn't handle the following URL, [...]
Tried it again just now and had the exact same issue. I'm using a more recent version of stack which supports the following configuration:
extra-deps:
- proteaaudio-0.7.0.1
- vect-0.4.7
- wavefront-0.7.1.1
- megaparsec-6.5.0
- github: lambdacube3d/lambdacube-ir
commit: b8b4ec9fa985b2eb756ac1a5a65af483a0bd586b
subdirs: [lambdacube-ir.haskell]
- github: lambdacube3d/lambdacube-gl
commit: 297828bdcf105c5942ed0e43d9f28130f543f34c
- github: lambdacube3d/lambdacube-compiler
commit: dc10dc255638b86f4a20a29a1b492e2415640b60
If this approach does not work, could you please check and copy how it is done in lambdacube-quake3's stack.yaml
?
https://github.com/lambdacube3d/lambdacube-quake3/blob/master/stack.yaml#L9-L22
I think it is more important aspect if the approach works rather it is old.
Did it work?
I'm closing this issue because GHC 8 is supported.
Lambdacube can be used in a stack (1.9.3) project with the following stack.yaml
syntax:
packages:
- location:
git: https://github.com/lambdacube3d/lambdacube-ir.git
commit: b8b4ec9fa985b2eb756ac1a5a65af483a0bd586b
subdirs:
- lambdacube-ir.haskell
extra-dep: true
- location:
git: https://github.com/lambdacube3d/lambdacube-gl.git
commit: 297828bdcf105c5942ed0e43d9f28130f543f34c
extra-dep: true
- location:
git: https://github.com/lambdacube3d/lambdacube-compiler.git
commit: dc10dc255638b86f4a20a29a1b492e2415640b60
extra-dep: true
If the newer/simpler github: ...
syntax does not work for stack.yaml
then it is probably a stack bug.
Which GHC version of the 8.x series? The current code does compile with GHC 8.6.1. It is used in lambdacube-quake3 project: https://github.com/lambdacube3d/lambdacube-quake3/blob/master/stack.yaml
Is it a problem that lambdacube-compiler's stack.yaml relies on an older version of stackage lts?