Breaking change in network-transport-tcp-0.6.0
When I try and build version 0.1.3.2 as a dependency of my own project, it fails with a compile error:
$ cabal install --only-dependencies --enable-tests
Resolving dependencies...
cabal: Entering directory '/tmp/cabal-tmp-7824/distributed-process-p2p-0.1.3.2'
Configuring distributed-process-p2p-0.1.3.2...
Building distributed-process-p2p-0.1.3.2...
Preprocessing library distributed-process-p2p-0.1.3.2...
[1 of 1] Compiling Control.Distributed.Backend.P2P ( src/Control/Distributed/Backend/P2P.hs, dist/dist-sandbox-fa12bf57/build/Control/Distributed/Backend/P2P.o )
src/Control/Distributed/Backend/P2P.hs:92:22: error:
• Couldn't match expected type ‘IO
(Either a0 Network.Transport.Transport)’
with actual type ‘Network.Transport.TCP.TCPParameters
-> IO
(Either
GHC.IO.Exception.IOException
Network.Transport.Transport)’
• Probable cause: ‘createTransport’ is applied to too few arguments
In the second argument of ‘(<$>)’, namely
‘createTransport host port defaultTCPParameters’
In a stmt of a 'do' block:
transport <- either (error . show) id
<$> createTransport host port defaultTCPParameters
In the expression:
do { transport <- either (error . show) id
<$> createTransport host port defaultTCPParameters;
newLocalNode transport rTable }
src/Control/Distributed/Backend/P2P.hs:92:48: error:
• Couldn't match expected type ‘ServiceName
-> (HostName, ServiceName)’
with actual type ‘Network.Transport.TCP.TCPParameters’
• In the third argument of ‘createTransport’, namely
‘defaultTCPParameters’
In the second argument of ‘(<$>)’, namely
‘createTransport host port defaultTCPParameters’
In a stmt of a 'do' block:
transport <- either (error . show) id
<$> createTransport host port defaultTCPParameters
cabal: Leaving directory '/tmp/cabal-tmp-7824/distributed-process-p2p-0.1.3.2'
Failed to install distributed-process-p2p-0.1.3.2
cabal: Error: some packages failed to install:
distributed-process-p2p-0.1.3.2 failed during the building phase. The
exception was:
ExitFailure 1
This is with GHC 8.0.2, cabal-install 1.24.0.2.
Comments (7)
-
repo owner -
reporter It was using
0.7.3
. But I just tried adding a version constraint fordistributed-process
in my cabal file to>= 0.6 && < 0.7
and now it installs correctly. So I've now gotdistributed-process
0.6.6
andp2p
0.1.3.2
. -
repo owner Aha, i've checked my versions and it appears that the breaking change were introduced in
network-transport-tcp-0.6.0
(one more argument to createTransport).You can add constraint to your package on n-t-tcp being
<=0.5.1
. This should allow you to use latests distributed-process while I hack around that new transport version. -
repo owner -
assigned issue to
- changed title to Breaking change in network-transport-tcp-0.6.0
-
assigned issue to
-
reporter Thanks, @dpwiz. Yes, the
network-transport-tcp
<=0.5.1
constraint works for me. -
I'll try to upgrade it to >= 0.6 and make a PR. I'll upgrade other packages as well, but I'm new to haskell so I'll need someone to carefully review my changes.
-
repo owner - changed status to resolved
0.1.4.0 released with version bump.
- Log in to comment
What's your
distributed-process
version? I just built my checkout with d-p being0.7.3
. And it was built before with0.6.6
.