yesodweb/wai

Warp 3.3.22 breaks WarpTLS 3.3.2

yobson opened this issue · 8 comments

WarpTLS build error

Warp version 3.3.22 removes:

  • connFree
  • connBufferSize

from the Connection type. As a result, building a warp application that includes warpTLS (without bounds) from hackage breaks.

Using this cabal file:

cabal-version:      2.4
name:               test-app
version:            0.1.0.0

executable test-app
    main-is:          Main.hs
    build-depends:    base ^>=4.16.1.0,
                      warp-tls
    hs-source-dirs:   app
    default-language: Haskell2010
$ cabal build
Resolving dependencies...
Build profile: -w ghc-9.2.2 -O2
In order, the following will be built (use -v for more details):
 - warp-tls-3.3.2 (lib) (requires build)
 - test-app-0.1.0.0 (exe:test-app) (first run)
Starting     warp-tls-3.3.2 (lib)
Building     warp-tls-3.3.2 (lib)

Failed to build warp-tls-3.3.2.
Build log (
/Users/jameshobson/.cabal/logs/ghc-9.2.2/wrp-tls-3.3.2-3d5c90fb.log ):
Configuring library for warp-tls-3.3.2..
Preprocessing library for warp-tls-3.3.2..
Building library for warp-tls-3.3.2..
[1 of 2] Compiling Network.Wai.Handler.WarpTLS.Internal ( Network/Wai/Handler/WarpTLS/Internal.hs, dist/build/Network/Wai/Handler/WarpTLS/Internal.o, dist/build/Network/Wai/Handler/WarpTLS/Internal.dyn_o )
[2 of 2] Compiling Network.Wai.Handler.WarpTLS ( Network/Wai/Handler/WarpTLS.hs, dist/build/Network/Wai/Handler/WarpTLS.o, dist/build/Network/Wai/Handler/WarpTLS.dyn_o )

Network/Wai/Handler/WarpTLS.hs:326:9: error:
    Not in scope: ‘connFree’
    |
326 |       , connFree             = freeBuffer writeBuf
    |         ^^^^^^^^

Network/Wai/Handler/WarpTLS.hs:330:9: error:
    Not in scope: ‘connBufferSize’
    |
330 |       , connBufferSize       = bufferSize
    |         ^^^^^^^^^^^^^^
cabal: Failed to build warp-tls-3.3.2 (which is required by exe:test-app from
test-app-0.1.0.0). See the build log above for details.

It is warp 3.3.22 that breaks warp-tls 3.3.2, not warp 3.3.21. https://hackage.haskell.org/package/warp-3.3.21/docs/Network-Wai-Handler-Warp-Internal.html shows that connFree was still present.

Thanks! I've updated the ticket!

My bad. I will take care of this ASAP.

warp 3.3.22 should be released as 3.4.0 since it includes a breaking change.
But I did not notice when I reviewed the PR.
I have released warp-tls 3.3.3 which requires warp 3.3.22 or later.

Could you do a metadata update on warpTLS 3.3.2 to make sure it isn't pulling 3.3.22?

@yobson Sorry the delay. I have done it.

@kazu-yamamoto No need to apologise! Thank you so much!

I will close the issue now 😃

kozer commented

I solved that by doing:

cabal install hoogle --constraint='warp<3.3.21'

Hope that helps!