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

libp2p-websocket: build error on async-tls 0.10.2 #1873

Closed
akru opened this issue Dec 6, 2020 · 6 comments
Closed

libp2p-websocket: build error on async-tls 0.10.2 #1873

akru opened this issue Dec 6, 2020 · 6 comments

Comments

@akru
Copy link

akru commented Dec 6, 2020

Build log

error[E0277]: the trait bound `TlsConnector: From<Arc<ClientConfig>>` is not satisfied                               [116/1854]
  --> /home/akru/.cargo/registry/src/github.mirror.nvdadr.com-1ecc6299db9ec823/libp2p-websocket-0.26.0/src/tls.rs:73:47                      
   |                                                                                                                           
73 |             client: Arc::new(client_config()).into(),                                                                     
   |                                               ^^^^ the trait `From<Arc<ClientConfig>>` is not implemented for `TlsConnecto
r`                                                                                                                             
   |                                                           
   = help: the following implementations were found:                                                                           
             <TlsConnector as From<Arc<rustls::client::ClientConfig>>>                                     
             <TlsConnector as From<rustls::client::ClientConfig>>                                                              
   = note: required because of the requirements on the impl of `Into<TlsConnector>` for `Arc<ClientConfig>`                    
                                                                                                                               
error[E0277]: the trait bound `TlsConnector: From<Arc<ClientConfig>>` is not satisfied                                         
   --> /home/akru/.cargo/registry/src/github.mirror.nvdadr.com-1ecc6299db9ec823/libp2p-websocket-0.26.0/src/tls.rs:119:43                        |                                                                                                                          
119 |             client: Arc::new(self.client).into(),                                                                        
    |                                           ^^^^ the trait `From<Arc<ClientConfig>>` is not implemented for `TlsConnector` 
    |                                                                                                                          
    = help: the following implementations were found:                                                                          
              <TlsConnector as From<Arc<rustls::client::ClientConfig>>>                                                        
              <TlsConnector as From<rustls::client::ClientConfig>>                                                             
    = note: required because of the requirements on the impl of `Into<TlsConnector>` for `Arc<ClientConfig>`

Description

The packages build fails with async-tls v0.10.2.

@akru
Copy link
Author

akru commented Dec 6, 2020

Looks like the reason is different rustls version, update to 0.19.0 should solve it.

@romanb
Copy link
Contributor

romanb commented Dec 7, 2020

See async-rs/async-tls#42.

@romanb
Copy link
Contributor

romanb commented Dec 7, 2020

libp2p-websocket-0.26.1 has been published that upgrades rustls and should thus build with async-tls-0.10.2. Since libp2p-websocket does not expose anything of rustls, we were able to make a patch release here.

@romanb
Copy link
Contributor

romanb commented Dec 7, 2020

As per the new libp2p-websocket patch release, this should be fixed. If there are still build issues after a cargo update, please let us know.

@akru
Copy link
Author

akru commented Dec 9, 2020

@romanb In my opinion, the async-tls version should be strictly bonded to >= 0.10.2, because of incompatibility with the 0.10.0 release.

@romanb
Copy link
Contributor

romanb commented Dec 9, 2020

Yes, probably. See #1881.

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

2 participants