brendanhay / gogol

A comprehensive Google Services SDK for Haskell.
Other
281 stars 105 forks source link

Cant compile with recent versions of servant #165

Closed larsr closed 1 week ago

larsr commented 3 years ago

When using versions of servant higher than 0.16.2 I get the following error when I compile

gogol-core   > [6 of 6] Compiling Network.Google.Prelude
gogol-core   >
gogol-core   > /run/user/1000/stack-ad522337ea560fac/gogol-core-0.5.0/src/Network/Google/Prelude.hs:31:1: error:
gogol-core   >     Could not find module ‘Servant.Utils.Links’
gogol-core   >     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
gogol-core   >    |
gogol-core   > 31 | import Servant.Utils.Links as Export hiding (Link)
gogol-core   >    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gogol-core   >

The reason is that Servant.Utils.Links is not available in servant-0.17.0 and above. I got it to compile by putting this into stack.yaml

extra-deps:
- servant-0.16.2
larsr commented 3 years ago

Seems to be a dupe of #144

yaitskov commented 3 years ago

if it is fixed why there is no release? because nixpkgs release 21.05 has this bug

s0kil commented 3 years ago

Also just ran across this issue.

s0kil commented 3 years ago

Since I'm using Nix, my workaround was to first generate a nix file for core library, cabal2nix https://github.com/brendanhay/gogol --subpath core and then for the specific API I'm using cabal2nix https://github.com/brendanhay/gogol --subpath gogol-shopping-content

tonicebrian commented 1 week ago

Gogol compiles with GHC 9.6 and LTS 22.27. Closing