ajnsit / concur

An unusual Web UI Framework for Haskell
https://ajnsit.github.io/concur/
BSD 3-Clause "New" or "Revised" License
305 stars 21 forks source link

Install instructions? #7

Open AphonicChaos opened 6 years ago

AphonicChaos commented 6 years ago

I didn't see any install instructions, but have come up with (I think) a minimal stack.yaml configuration:

resolver: lts-7.19
compiler: ghcjs-0.2.1.9007019_ghc-8.0.1
compiler-check: match-exact

setup-info:
  ghcjs:
    source:
      ghcjs-0.2.1.9007019_ghc-8.0.1:
           url: http://ghcjs.tolysz.org/ghc-8.0-2017-02-05-lts-7.19-9007019.tar.gz
           sha1: d2cfc25f9cda32a25a87d9af68891b2186ee52f9

packages:
- location: .

- location:
    git: https://github.com/ajnsit/concur
    commit: 83cf5e31d8de6f32014bb7c5becfe98683053a5e
  extra-dep: true
  subdirs:
    - concur-vdom
    - concur-core
- location:
    git: https://github.com/ghcjs/ghcjs-ffiqq
    commit: b52338c2dcd3b0707bc8aff2e171411614d4aedb
  extra-dep: true

- location:
    git: https://github.com/ajnsit/ghcjs-vdom
    commit: c9a72e5d6a2556900bfea96e3078adfc89aba858
  extra-dep: true

extra-deps:
  - natural-transformation-0.4
  - ghcjs-dom-0.9.2.0
  - ghcjs-vdom-0.2.0.0
  - ghcjs-ffiqq-0.1.0.0
  - ghcjs-dom-jsffi-0.9.2.0

flags: {}

extra-package-dbs: []

With the above, I can compile a project (and apparently concur examples) with stack setup && stack build), assuming I've already addedconcur-core,concur-vdom, andghcjs-vdomtobuild-depends`.

I'm currently building after having added the dependencies for ghcjs-ffiqq, so I'll update this if needed once that's done, or ask for help if I struggle. I'm not submitting a PR because I wasn't sure where/if you wanted this. Easiest thing I can think to do is add appropriate stack.yaml files to the examples directory of each backend directory and then briefly hint at them in concur's readme.

ajnsit commented 6 years ago

Thank for looking into this. This stack.yaml looks pretty good! Eventually I will upload concur to Hackage and Stackage so it'll be less complicated. Until then, this stack.yaml is a good start for people.

Keeping this issue open until install instructions are clearly specified in the docs.

Woody88 commented 6 years ago

Hi guys,

I tried installing concur with this starter template https://github.com/concurhaskell/concur-vdom-starter. However, I am getting the error below using the stack.yaml that comes with the template and also the suggested stack.yaml above. Would you be able to help me with the installation?

solver must be one of: modular                
CallStack (from HasCallStack):                
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE
ghcjs-boot: error running: /home/woodson/.cabal/bin/cabal --config-file /home/woodson/.ghcjs/x86_64-linux-0.2.1.9007019-8.0.1/ghcjs/cabalBootConfig --ignore-sandbox install ./boot/ghc-prim --solver=topdown --global --ghcjs --one-shot --avoid-reinstalls --builddir dist --with-compiler /home/woodson/.stack/programs/x86_64-linux/ghcjs-0.2.1.9007019_ghc-8.0.1/src/.stack-work/install/x86_64-linux/lts-7.19/8.0.1/bin/ghcjs --with-hc-pkg /home/woodson/.stack/programs/x86_64-linux/ghcjs-0.2.1.9007019_ghc-8.0.1/src/.stack-work/install/x86_64-linux/lts-7.19/8.0.1/bin/ghcjs-pkg --prefix /home/woodson/.ghcjs/x86_64-linux-0.2.1.9007019-8.0.1/ghcjs --enable-documentation --haddock-html --haddock-hyperlink-source --enable-shared --enable-library-profiling -v2 --dry-run
exit status: 1                                
stderr: solver must be one of: modular        
CallStack (from HasCallStack):                
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE

Booting GHCJS (this will take a long time) ...Process exited with ExitFailure 1: /home/woodson/.stack/programs/x86_64-linux/ghcjs-0.2.1.9007019_ghc-8.0.1/src/.stack-work/install/x86_64-linux/lts-7.19/8.0.1/bin/ghcjs-boot --clean
ajnsit commented 6 years ago

@Woody88 Looks like ghcjs-boot is failing on your system. Try this - https://stackoverflow.com/questions/48080510/stack-setup-error-solver-must-be-one-of-modular.