tsoding / HyperNerd

Total Surveillance Automatic Ban Machine for Twitch and Discord
https://www.twitch.tv/tsoding
MIT License
147 stars 16 forks source link

cabal build fails due to incompatible discord-haskell version #730

Open cahe7cb opened 5 years ago

cahe7cb commented 5 years ago

OS: Arch Linux ghc: 8.6.5 cabal: 2.4.1.0

Seems like the import structure of the discord-haskell package changed in the latest version (1.0.0) so the requirement specified in the HyperNerd.cabal for discord-haskell >= 0.8.3 is no longer compatible.

build log:

 $ cabal build
Resolving dependencies...
Configuring HyperNerd-0.1.0.0...
Preprocessing executable 'Markov' for HyperNerd-0.1.0.0..
Building executable 'Markov' for HyperNerd-0.1.0.0..
[1 of 2] Compiling Markov           ( src/Markov.hs, dist/build/Markov/Markov-tmp/Markov.o )
[2 of 2] Compiling Main             ( src/MarkovMain.hs, dist/build/Markov/Markov-tmp/Main.o )
Linking dist/build/Markov/Markov ...
Preprocessing executable 'HyperNerd' for HyperNerd-0.1.0.0..
Building executable 'HyperNerd' for HyperNerd-0.1.0.0..
[ 1 of 45] Compiling Bot.DocLoc       ( src/Bot/DocLoc.hs, dist/build/HyperNerd/HyperNerd-tmp/Bot/DocLoc.o )
[ 2 of 45] Compiling Data.Bool.Extra  ( src/Data/Bool/Extra.hs, dist/build/HyperNerd/HyperNerd-tmp/Data/Bool/Extra.o )
[ 3 of 45] Compiling Data.Either.Extra ( src/Data/Either/Extra.hs, dist/build/HyperNerd/HyperNerd-tmp/Data/Either/Extra.o )
[ 4 of 45] Compiling Config           ( src/Config.hs, dist/build/HyperNerd/HyperNerd-tmp/Config.o )

src/Config.hs:42:20: error:
    Not in scope: type constructor or class ‘ChannelId’
   |
42 |   , dcChannels :: [ChannelId]
   |                    ^^^^^^^^^

src/Config.hs:43:18: error:
    Not in scope: type constructor or class ‘GuildId’
   |
43 |   , dcGuildId :: GuildId
   |                  ^^^^^^^

Reverting the library to an earlier version with:

$ cabal sandbox hc-pkg -- unregister discord-haskell --force
$ cabal install discord-haskell-0.8.3

Makes the build process succeed again.

Is it supposed to work with the v2-/new- commands?

rexim commented 5 years ago

@cahe7cb have you tried v2 tho? I switched to v2 long time ago and works fine for me. I think we should update the docs already.