HuwCampbell/grenade

Do you have non-mafia install tips?

mittenchops opened this issue · 2 comments

Amazing library. Great work.

I tried installing with stack and had some version conflicts. Is it possible there is a non-mafia installer?

What conflicts do you get? It should work with lts-9.21. The only thing you need to do is

# git clone https://github.com/HuwCampbell/grenade.git && cd grenade
# stack init 
# stack build 

stack init then searches for the correct resolver which should succeed after 3-4 tries. The stack.yaml file will have following options enabled:

# cat stack.yaml
resolver: lts-9.21
packages:
- .
- examples

Edit: You might also want to upgrade stack via stack upgrade if you run an older version. The example feedforward can then be run by cd examples && stack exec feedforward.

Thanks, that worked.

I had originally done:

$ stack install grenade

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for grenade-0.1.0:
    exceptions-0.10.0 from stack configuration does not match ==0.8.*  (latest matching version is 0.8.3)
    hmatrix-0.19.0.0 from stack configuration does not match ==0.18.*  (latest matching version is 0.18.2.0)
    singletons-2.4.1 from stack configuration does not match >=2.1 && <2.3  (latest matching version is 2.2)
needed since grenade is a build target.

Which I know did not follow your installation instructions. After adding the extra-deps, + template-haskell-2.11.1.0 (more on that in a sec):

$ stack install grenade

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for th-desugar-1.6:
    template-haskell-2.13.0.0 from stack configuration does not match <2.12  (latest matching version is 2.11.1.0)
needed due to grenade-0.1.0 -> th-desugar-1.6

Some different approaches to resolving this:

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build configuration. This can be convenient when dealing with many complicated constraint
    errors, but results may be unpredictable.

  * Recommended action: try adding the following to your extra-deps in /home/user/place/stack.yaml:

- template-haskell-2.11.1.0

Plan construction failed.

Even after adding template-haskell-2.11.1.0, I was getting this error repeatedly. Building from github worked.

It looks like GHC was heavily sandboxed in that installation. This would prevent me from using the library in other programs, in other directories, right? Do people tend to work with your project just by operating in the examples/ directory, parallel to what you provided?