Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to solve a stack error: library must match >=0.10, but the stack configuration has no specified version (latest applicable is 0.10)

Tags:

haskell

I'm trying to use brick in a stack project.

Here's the error output:

brick must match >=0.10, but the stack configuration has no specified version (latest applicable is 0.10)

It suggests:

Recommended action: try adding the following to your extra-deps in /my-project-path/stack.yaml: - brick-0.10

Which I have done, but it doesn't help: same error message.

packages:
- '.'
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps: 
- brick-0.10

Then launching stack solver gives us:

Using resolver: lts-7.1 Using compiler: ghc-8.0.1 Asking cabal to calculate a build plan... Trying with packages from lts-7.1 as hard constraints... Could not parse cabal-install errors:

>>>> Cabal errors begin
cabal: failed to parse output of 'ghc-pkg dump'
<<<< Cabal errors end

What is strange is that the stack.yaml was originally pointing to resolver lts-6.2, but stack solver used lts-7.1 all the same.

My first two questions are:

  • I'm wondering whether my stack.yaml file is read at all ?
  • Is there something I can do to know what ghc-pkg dump failed exactly ?

And finally, do you know what could solve the issue ?

like image 655
Stephane Rolland Avatar asked Sep 26 '16 22:09

Stephane Rolland


1 Answers

I think the cabal executable is choking in this case. Try running stack build cabal-install to get the matching cabal executable for your snapshot.

If that fixes things, can you open a bug report?

like image 138
Michael Snoyman Avatar answered Oct 14 '22 08:10

Michael Snoyman