Advance warning to package authors of breakage
Duncan Coutts
duncan.coutts at googlemail.com
Mon Nov 16 07:41:30 EST 2009
On Mon, 2009-11-16 at 12:28 +0100, Mikhail Glushenkov wrote:
> Hi,
>
> On Mon, Nov 16, 2009 at 1:47 AM, Duncan Coutts
> <duncan.coutts at googlemail.com> wrote:
> >
> > These packages all use "build-depends: base >= 3 && < 5" (except for
> > ghc-core which cheekily uses "build-depends: base < 10" --- a practise
> > we will ban if it becomes any more popular).
>
> I have one question. It looks like the recommended way to solve the
> problem is to use something like:
>
> Flag separateSYB
> Description: Data.Generics available in separate package.
>
> [...]
> if flag(separateSYB)
> build-Depends: base >= 3 && < 4
> else
> build-Depends: base >= 4 && < 5, syb
>
> When the user types 'cabal install pointful' (without providing
> -fseparateSYB), which version of base will be the executable built
> against?
It prefers the default value of the flag. If that's impossible then it
tries with the non-default flag value. When you do not specify a default
flag value, the default is True.
So as you've written it, in the absence of any constraints it'll pick
the separateSYB=True configuration, which as you've written it, will
*not* use the separate syb package. I think you intended to write it the
other way around.
Duncan
More information about the Libraries
mailing list