lpsmith / postgresql-libpq

Low-level Haskell bindings for libpq
BSD 3-Clause "New" or "Revised" License
19 stars 18 forks source link

Remove `programFindLocation` and `hookedPrograms` calls from Setup.hs #11

Closed mkscrg closed 11 years ago

mkscrg commented 11 years ago

An upcoming version of the Cabal library will change the signature of the programFindLocation record field: https://github.com/haskell/cabal/commit/84c4ddce652cd8f60c57c940abfbe927bb03654f#L7L49

That change breaks this library's Setup.hs, which makes use of that record field. It looks to me like we can just remove the usage, which is much simpler than trying to use CPP to conditionally add a dummy argument.

The current Setup.hs checks for pgconfig and then pg_config on the path, and then uses that executable to find libpq's include/ and lib/ directories. To the best of my knowledge, pgconfig is not used by any recent version of PostgreSQL. (I've looked as far back as version 7.2, released 12 years ago.) Without needing that cascading path check, we can make do without the direct record field update.

I've also removed an unneeded use of the hookedPrograms record field in main. That made pgconfig available as a build tool to the .cabal file, which doesn't actually use it.

lpsmith commented 11 years ago

Thanks!