lykahb / groundhog

This library maps datatypes to a relational model, in a way similar to what ORM libraries do in OOP. See the tutorial https://www.schoolofhaskell.com/user/lykahb/groundhog for introduction
http://hackage.haskell.org/package/groundhog
176 stars 39 forks source link

Build failure with groundhog-postgresql-0.8.0.2 #78

Closed DanBurton closed 6 years ago

DanBurton commented 6 years ago

As seen on the Stackage build server:

[1 of 4] Compiling Database.Groundhog.Postgresql ( Database/Groundhog/Postgresql.hs, dist/build/Database/Groundhog/Postgresql.o )

Database/Groundhog/Postgresql.hs:166:10: error:
    Not in scope: type constructor or class ‘TryConnectionManager’
    Perhaps you meant ‘ConnectionManager’ (imported from Database.Groundhog.Core)
    |
166 | instance TryConnectionManager Postgresql where
    |          ^^^^^^^^^^^^^^^^^^^^

I was able to reproduce the issue locally like so:


$ stack unpack groundhog-postgresql-0.8.0.2 && cd groundhog-postgresql-0.8.0.2
$ stack init --resolver nightly-2018-03-07
$ stack test
lykahb commented 6 years ago

That's a strange error - that class has been in the Core module for a long time. The only change in this release is bumping aeson. It looks like a linker problem.

When I run the commands locally, it fails with a different error:

vagrant@vagrant-ubuntu-trusty-64:~/groundhog-postgresql-0.8.0.2$ stack init --resolver nightly-2018-03-07
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- groundhog-postgresql.cabal

Selected resolver: nightly-2018-03-07
Downloaded nightly-2018-03-07 build plan.
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\""
DanBurton commented 6 years ago

That error message indicates a bug in an older version of stack. You can run stack upgrade to upgrade to a newer version of stack.

lykahb commented 6 years ago

Thank you! The error was that some new code got merged into master but never released. The new release of groundhog and the database-specific packages will fix it. It's already on Hackage.

DanBurton commented 6 years ago

Awesome, thanks!