gogol icon indicating copy to clipboard operation
gogol copied to clipboard

Cant compile with recent versions of servant

Open larsr opened this issue 3 years ago • 4 comments

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 avatar Jun 04 '21 11:06 larsr

Seems to be a dupe of #144

larsr avatar Jun 04 '21 11:06 larsr

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

yaitskov avatar Jul 22 '21 17:07 yaitskov

Also just ran across this issue.

s0kil avatar Jul 27 '21 12:07 s0kil

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

s0kil avatar Jul 27 '21 14:07 s0kil