Re: Library version choosing of cabal sandbox build

2014-07-16 Thread Brandon Allbery
On Wed, Jul 16, 2014 at 3:42 AM, Daniel Trstenjak < daniel.trsten...@gmail.com> wrote: > Just to make it clear, a cabal sandbox build does consider the installed > libraries in the user package database, right? > No, the sandbox mechanism coopts the user package database mechanism, so it cannot s

Re: Library version choosing of cabal sandbox build

2014-07-16 Thread Daniel Trstenjak
On Wed, Jul 16, 2014 at 12:00:27PM +0200, Johan Tibell wrote: > Sorry, I read this to quickly as I was in a rush this morning. Sandboxes > consider only the global package DB, not the user package DB. Ok, I just saw, that I've irritated myself, because just removing the upper bound of the library

Re: Library version choosing of cabal sandbox build

2014-07-16 Thread Johan Tibell
Sorry, I read this to quickly as I was in a rush this morning. Sandboxes consider only the global package DB, not the user package DB. On Wed, Jul 16, 2014 at 11:59 AM, Roman Cheplyaka wrote: > This doesn't make sense to me. Can you elaborate? > > * Johan Tibell [2014-07-16 10:00:59+0200] > >

Re: Library version choosing of cabal sandbox build

2014-07-16 Thread Roman Cheplyaka
This doesn't make sense to me. Can you elaborate? * Johan Tibell [2014-07-16 10:00:59+0200] > Right > > > On Wed, Jul 16, 2014 at 9:42 AM, Daniel Trstenjak < > daniel.trsten...@gmail.com> wrote: > > > > > Hi Johan, > > > > On Tue, Jul 15, 2014 at 01:07:17PM +0200, Johan Tibell wrote: > > > Cab

Re: Library version choosing of cabal sandbox build

2014-07-16 Thread Johan Tibell
Right On Wed, Jul 16, 2014 at 9:42 AM, Daniel Trstenjak < daniel.trsten...@gmail.com> wrote: > > Hi Johan, > > On Tue, Jul 15, 2014 at 01:07:17PM +0200, Johan Tibell wrote: > > Cabal is allowed to use any version that fullfills the required bounds. > It uses > > a heuristic the tends to prefer >

Re: Library version choosing of cabal sandbox build

2014-07-16 Thread Daniel Trstenjak
Hi Johan, On Tue, Jul 15, 2014 at 01:07:17PM +0200, Johan Tibell wrote: > Cabal is allowed to use any version that fullfills the required bounds. It > uses > a heuristic the tends to prefer > >  * installed >  * newest >  * other > > in that order. Just to make it clear, a cabal sandbox build

Re: Library version choosing of cabal sandbox build

2014-07-15 Thread Roman Cheplyaka
* Daniel Trstenjak [2014-07-15 14:40:33+0200] > > Hi Roman, > > > You should create a fresh sandbox per build, then. > > > > This is both sufficient (nothing is installed => no reason to prefer an > > older > > version) and necessary (when in a sandbox, cabal won't let you have two > > differe

Re: Library version choosing of cabal sandbox build

2014-07-15 Thread Daniel Trstenjak
Hi Roman, > You should create a fresh sandbox per build, then. > > This is both sufficient (nothing is installed => no reason to prefer an older > version) and necessary (when in a sandbox, cabal won't let you have two > different versions of the library installed). As long as you haven't insta

Re: Library version choosing of cabal sandbox build

2014-07-15 Thread Roman Cheplyaka
* Daniel Trstenjak [2014-07-15 13:15:23+0200] > > Hi Johan, > > > Cabal is allowed to use any version that fullfills the required bounds. It > > uses > > a heuristic the tends to prefer > > > >  * installed > >  * newest > >  * other > > > > in that order. > > > > If you want to make sure th

Re: Library version choosing of cabal sandbox build

2014-07-15 Thread Daniel Trstenjak
Hi Johan, > Cabal is allowed to use any version that fullfills the required bounds. It > uses > a heuristic the tends to prefer > >  * installed >  * newest >  * other > > in that order. > > If you want to make sure the newest version is used temporarily you can pass > --constraint="foo-1.2.3

Re: Library version choosing of cabal sandbox build

2014-07-15 Thread Johan Tibell
Cabal is allowed to use any version that fullfills the required bounds. It uses a heuristic the tends to prefer * installed * newest * other in that order. If you want to make sure the newest version is used temporarily you can pass --constraint="foo-1.2.3.4" to cabal install. If you want to

Re: Library version choosing of cabal sandbox build

2014-07-15 Thread Daniel Trstenjak
dan@machine ~> cabal --version cabal-install version 1.20.0.3 using version 1.20.0.1 of the Cabal library ___ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel