warp needs upper bound http2 < 4.2
tomjaguarpaw opened this issue · 6 comments
http2
version 4.2.0
introduced fields confMySockAddr
and confPeerSockAddr
into Network.HTTP2.Server.Config
. Compare
- https://hackage.haskell.org/package/http2-4.1.4/docs/Network-HTTP2-Server.html#t:Config
- https://hackage.haskell.org/package/http2-4.2.0/docs/Network-HTTP2-Server.html#t:Config
This causes builds of warp
to break:
Network/Wai/Handler/Warp/HTTP2.hs:48:16: error:
• Constructor ‘H2.Config’ does not have the required strict field(s): confMySockAddr,
confPeerSockAddr
• In the expression:
H2.Config
{confWriteBuffer = bufBuffer writeBuffer,
confBufferSize = bufSize writeBuffer, confSendAll = sendBS,
confReadN = recvN, confPositionReadMaker = pReadMaker ii,
confTimeoutManager = timeoutManager ii}
In an equation for ‘conf’:
conf
= H2.Config
{confWriteBuffer = bufBuffer writeBuffer,
confBufferSize = bufSize writeBuffer, confSendAll = sendBS,
confReadN = recvN, confPositionReadMaker = pReadMaker ii,
confTimeoutManager = timeoutManager ii}
In the expression:
do istatus <- newIORef False
rawRecvN <- makeRecvN bs $ connRecv conn
writeBuffer <- readIORef $ connWriteBuffer conn
let recvN
= wrappedRecvN
th istatus (S.settingsSlowlorisSize settings) rawRecvN
sendBS x = connSendAll conn x >> T.tickle th
....
....
|
48 | conf = H2.Config {
| ^^^^^^^^^^^...
This was the commit that introduced the too-loose bound: bf7761e
Specifically, to resolve this issue a Hackage revision needs to be made to all versions in the range 3.3.22 to 3.3.28 (inclusive) to restrict http2
to < 4.2
. See haskell-infra/hackage-trustees#377 (comment) for a build matrix that demonstrates that requirement.
In 7e89ac9, I introduced #if MIN_VERSION_http2(4,2,0)
.
So, I'm not sure why this break happens.
Sure, that gives 3.3.29
the correct behaviour. But all versions 3.3.22
to 3.3.28
on Hackage have the wrong bounds, and need to be given Hackage revisions.
I edited them on Hackage by hand.
Please check.
That looks correct to me. Thanks!