Error installing hdbc-postgresql #1467

Closed
joefiorini opened this Issue Sep 3, 2013 · 5 comments

Projects

None yet

4 participants

@joefiorini

Trying to cabal install hdbc-postgresql using 1.18 yields the following error. It looks like something was removed, but I'm not sure what needs to change; I want to fix and send a PR if I can. Can someone please point me in the right direction?

/var/folders/f_/qw5qyv496r54hw15hcj0jrq00000gn/T/HDBC-postgresql-2.3.2.1-98079/HDBC-postgresql-2.3.2.1/Setup.hs:31:7:
    Couldn't match type `IO (Maybe FilePath)'
                  with `ProgramSearchPath -> IO (Maybe FilePath)'
    Expected type: IO (Maybe FilePath)
                   -> (Maybe FilePath -> IO (Maybe FilePath))
                   -> ProgramSearchPath
                   -> IO (Maybe FilePath)
      Actual type: IO (Maybe FilePath)
                   -> (Maybe FilePath -> IO (Maybe FilePath)) -> IO (Maybe FilePath)
    In a stmt of a 'do' block:
      pgconfig <- findProgramLocation verbosity "pgconfig"
    In the expression:
      do { pgconfig <- findProgramLocation verbosity "pgconfig";
           pg_config <- findProgramLocation verbosity "pg_config";
           return (pgconfig `mplus` pg_config) }
    In the `programFindLocation' field of a record
Failed to install HDBC-postgresql-2.3.2.1
@23Skidoo
Member
23Skidoo commented Sep 3, 2013

My guess is that it's @dcoutts's extraPath changes.

@23Skidoo 23Skidoo was assigned Sep 3, 2013
@23Skidoo
Member
23Skidoo commented Sep 3, 2013

Yes, this is due to the fact that the type of programFindLocation changed to Verbosity -> ProgramSearchPath -> IO (Maybe FilePath) in 1.18. The extra argument allows to use non-default search paths (usually we add ~/.cabal/bin to the search path).

@tibbe
Member
tibbe commented Sep 3, 2013

@dcoutts is programFindLocation considered a part of the stable API or is this breakage OK (i.e. the package author needs to use an ifdef)?

@23Skidoo
Member
23Skidoo commented Sep 3, 2013

I don't think there's a way to make this change backwards-compatible. The package authors will have to update their setup scripts.

@tibbe

is programFindLocation considered a part of the stable API or is this breakage OK

Officially everything under Distribution.Simple.* is unstable, but we try to preserve a degree of backwards compatibility since a lot of custom setup scripts use these APIs.

(i.e. the package author needs to use an ifdef)

The problem is that it's not possible to use CPP in setup scripts.

@23Skidoo 23Skidoo closed this Sep 3, 2013
@dcoutts
Member
dcoutts commented Sep 3, 2013

I agree. There's no sensible way to make this backwards compatible, and it is a change we want to make.

It will just break a few custom Setup.hs scripts sadly. A general solution to that is possible, but not for this release.

@Enlik Enlik added a commit to Sabayon/for-gentoo that referenced this issue Nov 2, 2013
@Enlik Enlik [dev-haskell/hdbc-postgresql] import from Portage to fix compilation f5abd74
@krdlab krdlab added a commit to krdlab/hdbc-mysql that referenced this issue Dec 14, 2013
@krdlab krdlab Add support for cabal 1.18 890454e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment