Did not build too effortlessly :)
Needed to:
sudo apt-get install dh-autoreconf
(cd /; stack install alex happy)
# from https://github.com/nodesource/distributions I found:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
I ran this already (part of setting up a new box for me):
sudo apt-get install -y build-essential
sudo apt-get install -y zlib1g-dev libssl-dev libreadline-dev libyaml-dev \
libxml2-dev libxslt1-dev libcurl4-openssl-dev \
libffi-dev
After that the whole thing compiled, but I could not use it due to this error:
% ./try-stack-reflex ghcjsi
Getting project config file from STACK_YAML environment
stack will use a locally installed GHCJS
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHCJS and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
Getting project config file from STACK_YAML environment
Ignoring that the GHCJS boot package "aeson" has a different version, 0.9.0.1, than the resolver's wanted version, 0.8.0.2
Ignoring that the GHCJS boot package "attoparsec" has a different version, 0.13.0.1, than the resolver's wanted version, 0.12.1.6
Ignoring that the GHCJS boot package "scientific" has a different version, 0.3.3.8, than the resolver's wanted version, 0.3.4.2
Ignoring that the GHCJS boot package "case-insensitive" has a different version, 1.2.0.4, than the resolver's wanted version, 1.2.0.5
Ignoring that the GHCJS boot package "hashable" has a different version, 1.2.3.2, than the resolver's wanted version, 1.2.3.3
Ignoring that the GHCJS boot package "async" has a different version, 2.0.1.6, than the resolver's wanted version, 2.0.2
Ignoring that the GHCJS boot package "vector" has a different version, 0.11.0.0, than the resolver's wanted version, 0.10.12.3
Ignoring that the GHCJS boot package "text" has a different version, 1.2.1.1, than the resolver's wanted version, 1.2.1.3
Ignoring that the GHCJS boot package "dlist" has a different version, 0.7.1.1, than the resolver's wanted version, 0.7.1.2
Ignoring that the GHCJS boot package "pretty" has a different version, 1.1.3.2, than the resolver's wanted version, 1.1.2.0
Ignoring that the GHCJS boot package "containers" has a different version, 0.5.6.3, than the resolver's wanted version, 0.5.6.2
Ignoring that the GHCJS boot package "primitive" has a different version, 0.6, than the resolver's wanted version, 0.6.1.0
Ignoring that the GHCJS boot package "transformers" has a different version, 0.4.3.0, than the resolver's wanted version, 0.4.2.0
Getting project config file from STACK_YAML environment
Couldn't get a file descriptor referring to the console
And stack path shows me:
No compiler found, expected exact version ghcjs-0.2.0.20151001_ghc-7.10.2 (x86_64) (based on resolver setting in /tmp/try-stack-reflex/stack.yaml).
Try running "stack setup" to install the correct GHC into /home/cies/.stack/programs/x86_64-linux/
Any ideas on how to remedy this?
hehe, the error seems to be that the try-stack-reflex script tries to open the compiled file but it is osx biased. Also, when you run stack path it is using another yaml file to what ./try-stack-reflex ghcjsi is using and therefore it shows compiler not found.
You should be able to do the following which is essentially what the script does:
export STACK_YAML=stack-ghcjsi-improved-base.yaml
stack setup
stack build
echo $(stack path --local-install-root)/bin/reflex-todomvc.jsexe
# Getting project config file from STACK_YAML environment
# /Users/luigy/code/haskell/try-stack-reflex/.stack-work/install/x86_64-osx/lts-3.18/ghcjs-0.2.0.20151007_ghc-7.10.2/bin/reflex-todomvc.jsexe
# this will print the directory where the generated index.html should reside
or you can pass the yaml file to stack for each command but I prefer the former
# ...
stack --stack-yaml stack-ghcjsi-improved-base.yaml setup
stack --stack-yaml stack-ghcjsi-improved-base.yaml build
# ... etc
I will upgrade the readme to make this clear and even probably make it the preferred method and modify the script to only handle setting up ghcjsi compiler in order to remove the indirection of what the script is doing :)
Needed to:
sudo apt-get install dh-autoreconf (cd /; stack install alex happy) # from https://github.com/nodesource/distributions I found: curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
I should probably add another yaml file that shows nix support especifically for setting up the compilers which should aid with being more in line with the effortlessly statement, but that can also come with other set of issues xD. It should ideally belong in https://github.com/ryantrinkle/try-reflex repo and possibly hook them with the stack pill :P
Hi!
Thanks for your quick reply. I run as you said:
export STACK_YAML=stack-ghcjsi-improved-base.yaml
Then:
stack setup
stack build
These two commands finished execution really fast and produced the following output:
Getting project config file from STACK_YAML environment
stack will use a locally installed GHCJS
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHCJS and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
Getting project config file from STACK_YAML environment
Ignoring that the GHCJS boot package "aeson" has a different version, 0.9.0.1, than the resolver's wanted version, 0.8.0.2
Ignoring that the GHCJS boot package "attoparsec" has a different version, 0.13.0.1, than the resolver's wanted version, 0.12.1.6
Ignoring that the GHCJS boot package "scientific" has a different version, 0.3.3.8, than the resolver's wanted version, 0.3.4.2
Ignoring that the GHCJS boot package "case-insensitive" has a different version, 1.2.0.4, than the resolver's wanted version, 1.2.0.5
Ignoring that the GHCJS boot package "hashable" has a different version, 1.2.3.2, than the resolver's wanted version, 1.2.3.3
Ignoring that the GHCJS boot package "async" has a different version, 2.0.1.6, than the resolver's wanted version, 2.0.2
Ignoring that the GHCJS boot package "vector" has a different version, 0.11.0.0, than the resolver's wanted version, 0.10.12.3
Ignoring that the GHCJS boot package "text" has a different version, 1.2.1.1, than the resolver's wanted version, 1.2.1.3
Ignoring that the GHCJS boot package "dlist" has a different version, 0.7.1.1, than the resolver's wanted version, 0.7.1.2
Ignoring that the GHCJS boot package "pretty" has a different version, 1.1.3.2, than the resolver's wanted version, 1.1.2.0
Ignoring that the GHCJS boot package "containers" has a different version, 0.5.6.3, than the resolver's wanted version, 0.5.6.2
Ignoring that the GHCJS boot package "primitive" has a different version, 0.6, than the resolver's wanted version, 0.6.1.0
Ignoring that the GHCJS boot package "transformers" has a different version, 0.4.3.0, than the resolver's wanted version, 0.4.2.0
Finally this command...
echo $(stack path --local-install-root)/bin/reflex-todomvc.jsexe
...yielded a path that, when given to my browser, showed a directory with an index.html inside. Clicked it and it worked like a charm.
Thanks!