Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

connection-0.2.5 fails to build with GHC 9.0.2 #54

Closed
andreasabel opened this issue Jun 16, 2023 · 5 comments
Closed

connection-0.2.5 fails to build with GHC 9.0.2 #54

andreasabel opened this issue Jun 16, 2023 · 5 comments

Comments

@andreasabel
Copy link

connection-0.2.5$ cabal build -w ghc-9.0.2
Resolving dependencies...
...
Building library for connection-0.2.5..
[1 of 2] Compiling Network.Connection.Types ( ... )

Network/Connection/Types.hs:19:1: warning: [-Wdeprecations]
    Module ‘Network.BSD’ is deprecated:
      This platform dependent module is no longer supported.
   |
19 | import Network.BSD (HostName)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2 of 2] Compiling Network.Connection ( ... )

Network/Connection.hs:101:43: error:
    • Couldn't match expected type ‘crypton-x509-store-1.6.9:Data.X509.CertificateStore.CertificateStore’
                  with actual type ‘Data.X509.CertificateStore.CertificateStore’
      NB: ‘crypton-x509-store-1.6.9:Data.X509.CertificateStore.CertificateStore’
            is defined in ‘Data.X509.CertificateStore’
                in package ‘crypton-x509-store-1.6.9’
          ‘Data.X509.CertificateStore.CertificateStore’
            is defined in ‘Data.X509.CertificateStore’
                in package ‘x509-store-1.6.9’
    • In the ‘sharedCAStore’ field of a record
      In the ‘clientShared’ field of a record
      In the expression:
        (TLS.defaultParamsClient (fst cid) portString)
          {TLS.clientSupported = def
                                   {TLS.supportedCiphers = TLS.ciphersuite_all},
           TLS.clientShared = def
                                {TLS.sharedCAStore = globalCertificateStore cg,
                                 TLS.sharedValidationCache = validationCache}}
    |
101 |             { TLS.sharedCAStore         = globalCertificateStore cg
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^
Error: cabal: Failed to build connection-0.2.5.

Probably the package is missing som upper bounds, which could be supplied via a hackage revision. Here is the dependencies used in this build attempt (as resolved by Cabal, excluding package shipped with GHC 9.0.2):

asn1-encoding-0.9.6
asn1-parse-0.9.5
asn1-types-0.3.4
async-2.2.4
base-orphans-0.9.0
basement-0.0.15
byteable-0.1.1
cereal-0.5.8.3
crypton-0.31
crypton-x509-1.7.6
crypton-x509-store-1.6.9
crypton-x509-validation-1.6.12
cryptonite-0.30
data-array-byte-0.1.0.1
data-default-class-0.1.2.0
hashable-1.4.2.0
hourglass-0.2.12
hsc2hs-0.68.9
memory-0.18.0
network-2.8.0.1
old-locale-1.0.0.7
old-time-1.1.0.3
pem-0.2.4
socks-0.5.4
tls-1.7.0
unix-time-0.4.9
x509-1.7.7
x509-store-1.6.9
x509-system-1.6.7
x509-validation-1.6.12
@cydparser
Copy link

I'm seeing the same error when building with GHC 9.6.2

@andreasabel
Copy link
Author

andreasabel commented Jul 22, 2023

Is it intended to use both cryptonite and crypton (fork of cryptonite)?

crypton-0.31
crypton-x509-1.7.6
crypton-x509-store-1.6.9
crypton-x509-validation-1.6.12
cryptonite-0.30

@joeyh
Copy link

joeyh commented Aug 1, 2023

Relatedly, I can't build connection-0.3.1 with stackage nightly-2023-08-01 (ghc ghc-9.6.2) because it contains tls-1.7.1, which uses crypton. Seems that crypton-connection is one way around this problem.

@bmillwood
Copy link

I can build with ghc 9.0.2 if I specify --preference=tls<1.7, so I think that would be sufficient as a Hackage revision.

@andreasabel
Copy link
Author

Thanks @bmillwood. I added bound tls < 1.7 in revision 4: https://hackage.haskell.org/package/connection-0.2.5/revisions/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants