kazu-yamamoto / crypton-certificate

Certificate and Key Reader/Writer in haskell
0 stars 5 forks source link

stackage warp-tls confused by overlapping modules with cryptonite #2

Closed juhp closed 1 year ago

juhp commented 1 year ago
       /var/stackage/work/unpack-dir/unpacked/warp-tls-3.3.6-9d1229280e4a21f8e3a0c3a9fbc15afe4a4a3f703a60d14e052331fba6053d2b/Network/Wai/Handler/WarpTLS.hs:389:40: error:           
           • Couldn't match type ‘x509-1.7.7:Data.X509.CertificateChain.CertificateChain’                                           
                            with ‘crypton-x509-1.7.6:Data.X509.CertificateChain.CertificateChain’                                   
             Expected: Maybe                                      
                         crypton-x509-1.7.6:Data.X509.CertificateChain.CertificateChain                                             
               Actual: Maybe                                      
                         x509-1.7.7:Data.X509.CertificateChain.CertificateChain                                                     
             NB: ‘crypton-x509-1.7.6:Data.X509.CertificateChain.CertificateChain’                                                   
                   is defined in ‘Data.X509.CertificateChain’     
                       in package ‘crypton-x509-1.7.6’                                                                              
                 ‘x509-1.7.7:Data.X509.CertificateChain.CertificateChain’                
                   is defined in ‘Data.X509.CertificateChain’ in package ‘x509-1.7.7’
           • In the ‘tlsClientCertificate’ field of a record                                                                        
             In the first argument of ‘return’, namely                                                                              
               ‘TLS                                               
                  {tlsMajorVersion = major, tlsMinorVersion = minor,                                                                
                   tlsNegotiatedProtocol = proto,                                                                                   
                   tlsChiperID = TLS.cipherID infoCipher,         
                   tlsClientCertificate = clientCert}’                                                                              
             In a stmt of a 'do' block:                           
               return            
                 TLS
                   {tlsMajorVersion = major, tlsMinorVersion = minor,                                                               
                    tlsNegotiatedProtocol = proto,                
                    tlsChiperID = TLS.cipherID infoCipher,                                                                          
                    tlsClientCertificate = clientCert}            
           |   
       389 |               , tlsClientCertificate = clientCert                                                                      
           |                                        ^^^^^^^^^^                                                                      

Somewhat similar to #1

For now I will disable crypton-x509* in Stackage Nightly. Not sure if this is a stack limitation - but basically at least in Stackage conflicting modules tend to cause problems.

I think this will get resolved once we switch Stackage Nightly to crypton, so maybe you can close this... (but as yet not quite clear when that will happen alas).

felixonmars commented 1 year ago

This should be fixed with upgrading warp-tls to 3.4.0.

juhp commented 1 year ago

Thank you - let me close this for now then