Can't build cassava (for csv file I/O) (my first attempt to use stack to build something useful)

14 views
Skip to first unread message

Jack Vice

unread,
Aug 11, 2018, 11:07:02 PM8/11/18
to haskell-stack
I am trying to import .csv data and so I am trying to build a simple example using cassava and I have run out of ideas to get it to work.  I added cassava-0.5.1.0 to stack.yaml and then the builder failed based on version and suggested bytestring-0.10.2.0, which I added then version failed and suggested deepseq-1.3.0.2 and then version failed and suggested base-4.7.0.2 and fails and keeps suggesting adding base-4.7.0.2 though it is in there.  I tried "allow-newer: true" and gave a bunch of type failures.  I also tried stack solver --update-config which just removed all the extra-deps: including cassava.  It appears not to find base-4.7.0.2. This is my first attempt to build something useful with stack.

"stack build" output below:

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

In the dependencies for deepseq-1.3.0.2:
    base-4.11.1.0 from stack configuration does not match >=4.3 && <4.8  (latest matching version is 4.7.0.2)
needed due to bayesHask-0.1.0.0 -> deepseq-1.3.0.2

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/jack/Dropbox/src/bayesHask/stack.yaml:

- base-4.7.0.2

Plan construction failed.


stack.yaml file:
flags: {}
packages:
- .
extra-deps:
- cassava-0.5.1.0
- bytestring-0.10.2.0
- deepseq-1.3.0.2
- base-4.7.0.2

resolver: lts-12.5

#allow-newer: true


Lib.hs file:
module Lib
    ( someFunc
    ) where

import qualified Data.Text.IO as T
import qualified Data.ByteString.Lazy as BL
import Data.Csv
import qualified Data.Vector as V

someFunc :: IO ()
someFunc = putStrLn "someFunc"


package.yaml file:
name:                bayesHask
version:             0.1.0.0
github:              "githubuser/bayesHask"
license:             BSD3
author:              "Jack Vice"
maintainer:          "exa...@example.com"
copyright:           "2018 Jack Vice"

extra-source-files:
- README.md
- ChangeLog.md

# Metadata used when publishing your package
# synopsis:            Short description of your package
# category:            Web

# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
description:         Please see the README on GitHub at <https://github.com/githubuser/bayesHask#readme>

dependencies:
- base >= 4.7 && < 5
- text
- bytestring
- cassava

library:
  source-dirs: src


executables:
  bayesHask-exe:
    main:                Main.hs
    source-dirs:         app
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - bayesHask

tests:
  bayesHask-test:
    main:                Spec.hs
    source-dirs:         test
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - bayesHask

Michael Snoyman

unread,
Aug 11, 2018, 11:21:49 PM8/11/18
to Jack Vice, haskell-stack
What version of Stack are you using? What message do you get if you remove the entire extra-deps section?

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/2077f485-1ee7-44b9-aeb8-b1b12ee94c30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jack Vice

unread,
Aug 12, 2018, 9:09:07 AM8/12/18
to haskell-stack
Thank you.  I actually switched to MissingH to do the csv file I/O stuff and I just got it to build-compile using stack. I am on Ubuntu 18.04 and stack 1.7.1.   
Reply all
Reply to author
Forward
0 new messages