Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http-client-tls-0.3.6.4 is missing lowerbound on tls (>= 2.1.2) #548

Open
bfrk opened this issue Nov 1, 2024 · 1 comment
Open

http-client-tls-0.3.6.4 is missing lowerbound on tls (>= 2.1.2) #548

bfrk opened this issue Nov 1, 2024 · 1 comment

Comments

@bfrk
Copy link

bfrk commented Nov 1, 2024

I am now getting this error

Building library for http-client-tls-0.3.6.4..
[1 of 1] Compiling Network.HTTP.Client.TLS ( Network/HTTP/Client/TLS.hs, dist/build/Network/HTTP/Client/TLS.o, dist/build/Network/HTTP/Client/TLS.dyn_o )

Network/HTTP/Client/TLS.hs:118:40: error: [GHC-39999]
    • No instance for ‘Default NC.TLSSettings’
        arising from a use of ‘def’
    • In the first argument of ‘mkManagerSettings’, namely ‘def’
      In the expression: mkManagerSettings def Nothing
      In an equation for ‘tlsManagerSettings’:
          tlsManagerSettings = mkManagerSettings def Nothing
    |
118 | tlsManagerSettings = mkManagerSettings def Nothing
    |                                        ^^^

Network/HTTP/Client/TLS.hs:192:100: error: [GHC-39999]
    • Could not deduce ‘Default NC.TLSSettings’
        arising from a use of ‘def’
      from the context: MonadIO m
        bound by the type signature for:
                   newTlsManager :: forall (m :: * -> *). MonadIO m => m Manager
        at Network/HTTP/Client/TLS.hs:186:1-39
    • In the third argument of ‘mkManagerSettingsContext'’, namely
        ‘def’
      In the expression:
        mkManagerSettingsContext'
          defaultManagerSettings (Just globalConnectionContext) def
          msocksHTTP msocksHTTPS
      In an equation for ‘settings’:
          settings
            = mkManagerSettingsContext'
                defaultManagerSettings (Just globalConnectionContext) def
                msocksHTTP msocksHTTPS
    |
192 |         settings = mkManagerSettingsContext' defaultManagerSettings (Just globalConnectionContext) def msocksHTTP msocksHTTPS
    |                                                                                                    ^^^

Network/HTTP/Client/TLS.hs:208:81: error: [GHC-39999]
    • Could not deduce ‘Default NC.TLSSettings’
        arising from a use of ‘def’
      from the context: MonadIO m
        bound by the type signature for:
                   newTlsManagerWith :: forall (m :: * -> *).
                                        MonadIO m =>
                                        ManagerSettings -> m Manager
        at Network/HTTP/Client/TLS.hs:202:1-62
    • In the third argument of ‘mkManagerSettingsContext'’, namely
        ‘def’
      In the expression:
        mkManagerSettingsContext'
          set (Just globalConnectionContext) def msocksHTTP msocksHTTPS
      In an equation for ‘settings’:
          settings
            = mkManagerSettingsContext'
                set (Just globalConnectionContext) def msocksHTTP msocksHTTPS
    |
208 |         settings = mkManagerSettingsContext' set (Just globalConnectionContext) def msocksHTTP msocksHTTPS
    |                                                                                 ^^^
Error: cabal: Failed to build http-client-tls-0.3.6.4 (which is required by
darcs-2.19.1). See the build log above for details.

Specifying http-client-tls < 0.3.6.4 (instead of < 0.4 which we had before) fixes our build, but this is not a good solution in the long run, since it cuts us off from bug fixes etc.

@bfrk
Copy link
Author

bfrk commented Nov 8, 2024

The better solution for us was to raise upper bounds on tls and switch from data-default-class to data-default:

    hunk ./darcs.cabal 468
    -                      data-default-class >= 0.1.2.0 && < 0.1.3,
    +                      data-default      >= 0.7.1.3 && < 0.9,
    hunk ./darcs.cabal 470
    -                      tls               >= 2.0.6 && < 2.1
    +                      tls               >= 2.0.6 && < 2.2
    hunk ./src/Darcs/Util/HTTP.hs 49
    -import Data.Default.Class ( def )
    +import Data.Default ( def )

This would not have broken our build if http-client-tls-0.3.6.4 had the appropriate lower bound on tls, namely tls >= 2.1.2.

@bfrk bfrk changed the title http-client-tls-0.3.6.4 breaks our build http-client-tls-0.3.6.4 is missing lowerbound on tls (>= 2.1.2) Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant