Re: [Haskell-cafe] cabal install choosing an older version

2013-01-26 Thread Simon Hengel
Hi Ozgur,
I'm missing some context here, but I'll release an updated version of
hspec ASAP ;)

Cheers,
Simon

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Ozgur Akgun
Hi,

I noticed a weird behaviour with cabal-install. When I run `cabal install
hspec --dry-run -v` cabal-install correctly picks hspec-1.4.3 (the latest
version).

However, when I run `cabal install ansi-terminal hspec --dry-run
-v`cabal-install tries to install hspec-0.3.0 for no apparent reason.

This is with a clean user package db.

Following is some info about my system.


$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.1

$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library

$ ghc-pkg list --user

$ cabal install hspec --dry-run -v
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
HUnit-1.2.5.1 (new package)
ansi-terminal-0.5.5.1 (new package)
hspec-expectations-0.3.0.3 (new package)
random-1.0.1.1 (new package)
QuickCheck-2.5.1.1 (new package)
setenv-0.1.0 (new package)
silently-1.2.4.1 (new package)
transformers-0.3.0.0 (new package)
hspec-1.4.3 (new package)

$ cabal install ansi-terminal hspec --dry-run -v
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
HUnit-1.2.5.1 (new package)
ansi-terminal-0.6 (new package)
extensible-exceptions-0.1.1.4 (new package)
random-1.0.1.1 (new package)
QuickCheck-2.5 (new package)
hspec-0.3.0 (new package)



-- 
Ozgur Akgun
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Ozgur Akgun
Aha!

I think I know why this happens.

The latest versions of ansi-terminal and hspec do not work together. Cabal
picks the latest ansi-terminal (0.6) first, then the latest hspec that
doesn't conflict with this choice is 0.3.0.

I can confirm this by the following:

$ cabal install hspec ansi-terminal --dry-run -v
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
HUnit-1.2.5.1 (new package)
ansi-terminal-0.5.5.1 (new package)
hspec-expectations-0.3.0.3 (new package)
random-1.0.1.1 (new package)
QuickCheck-2.5.1.1 (new package)
setenv-0.1.0 (new package)
silently-1.2.4.1 (new package)
transformers-0.3.0.0 (new package)
hspec-1.4.3 (new package)

When hspec comes before ansi-terminal, the latest version for hspec is
selected and an older version of ansi-terminal is used.

Maybe cabal-install should backtrack more and pick a *more optimal *set of
latest versions, I don't know. If this is desired, a proximity of the
selected versions to the latest available versions might be a good measure.

Best,
Ozgur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Max Bolingbroke
On 25 January 2013 14:46, Ozgur Akgun ozgurak...@gmail.com wrote:
 The latest versions of ansi-terminal and hspec do not work together. Cabal
 picks the latest ansi-terminal (0.6) first, then the latest hspec that
 doesn't conflict with this choice is 0.3.0.

If this happens because the dependency bounds of ansi-terminal are too
tight then please send me a patch.

Cheers,
Max

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal install choosing an older version

2013-01-25 Thread Ozgur Akgun
Hi Max,

On 25 January 2013 15:58, Max Bolingbroke batterseapo...@hotmail.comwrote:


 If this happens because the dependency bounds of ansi-terminal are too
 tight then please send me a patch.


No, actually it happens because hspec depends on ansi-terminal-0.5.*.

I am cc'ing Simon Hengel, the maintainer of hspec so he is aware of this.

Best,
Ozgur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe