jaspervdj / websockets

A Haskell library for creating WebSocket-capable servers
http://jaspervdj.be/websockets
BSD 3-Clause "New" or "Revised" License
405 stars 112 forks source link

Installation instruction does not work on cabal 3.6.2.0 #223

Closed el-hult closed 2 years ago

el-hult commented 2 years ago

Running cabal install websockets gives me

Resolving dependencies...
cabal-3.6.2.0.exe: Cannot build the executables in the package websockets
because none of the components are available to build: the executable
'websockets-example' and the executable 'websockets-autobahn' are all marked
as 'buildable: False'

And I can resolve the issue by only installing the library (as intended, I guess) by

cabal install --lib websockets

So I guess the instructions on https://jaspervdj.be/websockets/ should be updated.

ysangkok commented 2 years ago

As you can see from the Cabal file, the example is not buildable unless the flag is specified: https://github.com/jaspervdj/websockets/blob/master/websockets.cabal#L188

Did you try with -f Example?

el-hult commented 2 years ago

oh I see. that makes sense. I guess it is obvious when you know it. sorry about that.