Open jonathanknowles opened 8 years ago
@jonathanknowles Thank you for your feedback!
I was going to tell you to eventually open an issue on the stack tracker and I noticed you already did it here https://github.com/commercialhaskell/stack/issues/2642.
Did you try to update the compiler version (compiler: ghcjs-0.2.0.20160929_ghc-7.10.2
)? And maybe also the deps and the resolver?
I will try that at home later!
I updated some instructions on how to use ghcjs
with stack
. It lies shy at the bottom, but if it will be useful it will be moved slightly up
https://docs.haskellstack.org/en/stable/ghcjs/#comunity-repacks
It should build with node-6.6.0
Hi @yamafaktory
Thanks for your reply!
I tried specifying the latest versions of reflex and ghcjs, as follows:
$ cat stack.yaml
resolver: lts-7.1
flags: {}
extra-deps:
- ghcjs-dom-0.2.3.1
- haskell-src-exts-1.16.0.1
- reflex-0.4.0
- reflex-dom-0.3
- ref-tf-0.4
extra-package-dbs: []
compiler: ghcjs-0.2.1.9007001_ghc-8.0.1
compiler-check: match-exact
setup-info:
ghcjs:
source:
ghcjs-0.2.1.9007001_ghc-8.0.1:
url: "http://ghcjs.luite.com/master-20160528.tar.gz"
Attempting to compile produces the following output:
$ stack build
While constructing the build plan, the following exceptions were encountered:
In the dependencies for ghcjs-dom-0.2.3.1:
transformers-0.5.2.0 must match >=0.2 && <0.5 (latest applicable is 0.4.3.0)
needed due to reflex-starter-1.2.3 -> ghcjs-dom-0.2.3.1
In the dependencies for ref-tf-0.4:
transformers-0.5.2.0 must match >=0.2 && <0.5 (latest applicable is 0.4.3.0)
needed due to reflex-starter-1.2.3 -> ref-tf-0.4
In the dependencies for reflex-0.4.0:
base-4.9.0.0 must match >=4.7 && <4.9 (latest applicable is 4.8.2.0)
template-haskell-2.11.0.0 must match >=2.9 && <2.11 (latest applicable is 2.10.0.0)
these-0.7.2 must match >=0.4 && <0.7 (latest applicable is 0.6.2.1)
needed due to reflex-starter-1.2.3 -> reflex-0.4.0
In the dependencies for reflex-dom-0.3:
base-4.9.0.0 must match >=4.7 && <4.9 (latest applicable is 4.8.2.0)
data-default-0.7.1.1 must match ==0.5.* (latest applicable is 0.5.3)
lens-4.14 must match >=4.7 && <4.14 (latest applicable is 4.13.2.1)
these-0.7.2 must match >=0.4 && <0.7 (latest applicable is 0.6.2.1)
time-1.6.0.1 must match ==1.4.* || ==1.5.* (latest applicable is 1.5.0.1)
transformers-0.5.2.0 must match ==0.3.* || ==0.4.* (latest applicable is 0.4.3.0)
needed due to reflex-starter-1.2.3 -> reflex-dom-0.3
Plan construction failed.
I think this is because:
It seems that I could solve this problem by using an earlier version of GHCJS, but all the earlier versions of GHCJS that I've tried run into errors when using the latest versions of Node (6.6.0 onwards).
Perhaps the problem can be fixed by asking the reflex team to make a new release with a more relaxed upper bound on base. (It seems that the work has already been done in the reflex github repository with this change. Though perhaps they have reasons for holding back.
Would be interested to hear your thoughts, and whether there's an easier fix that I've missed. Thanks again for your help :)
I am testing it at https://github.com/tolysz/reflex-starter/tree/lts-7.1
But 2 things!
allow-newer: true
ghcjs-0.2.1.9007001_ghc-8.0.1:
is not a random label it needs to point to a specific snapshot
I am testing building with travis and will PR once it is working
@tolysz Thanks a lot for your work! I wanted to fix that yesterday evening using your tarball as URL, but then I had some issues with stack on my NixOS laptop!
OK, there is a PR https://github.com/yamafaktory/reflex-starter/pull/4 Which: uses lts-7.1, ghc8, and improves rebuilds (I hope).
Most constraints from the stack.yaml
could go, but ;) it is your job @yamafaktory to have the latest reflex
.
This is great @tolysz! No need to update reflex as v0.4.0 is actually the latest https://hackage.haskell.org/package/reflex.
@jonathanknowles is the issue solved for you with the latest updates?
Thanks for providing this example of how to build reflex with stack. :+1:
When using recent versions of node (for example, 6.6.0 or 6.7.0), the build appears to fail:
Let me know if you need me to provide any further info.