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

Unable to import from git #805

Closed
thavlik opened this issue Jun 21, 2020 · 1 comment
Closed

Unable to import from git #805

thavlik opened this issue Jun 21, 2020 · 1 comment

Comments

@thavlik
Copy link

thavlik commented Jun 21, 2020

Seems to be a quinn-proto/rustls problem.

[package]
name = "footest"
version = "0.1.0"
authors = ["Tom Havlik <keres993@gmail.com>"]
edition = "2018"

[dependencies]
quinn = { git = "https://github.com/djc/quinn", features = ["tls-rustls"] }
$ cargo check
    Updating git repository `https://github.com/djc/quinn`
    Updating crates.io index
   Compiling proc-macro2 v1.0.18
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.32
   Compiling libc v0.2.71
    Checking cfg-if v0.1.10
    Checking once_cell v1.4.0
   Compiling cc v1.0.54
   Compiling version_check v0.9.2
   Compiling log v0.4.8
    Checking untrusted v0.7.1
    Checking spin v0.5.2
   Compiling rustversion v1.0.3
   Compiling pin-project-internal v0.4.22
   Compiling getrandom v0.1.14
    Checking slab v0.4.2
   Compiling memchr v2.3.3
   Compiling proc-macro-nested v0.1.6
    Checking futures-core v0.3.5
    Checking lazy_static v1.4.0
   Compiling proc-macro-hack v0.5.16
    Checking futures-sink v0.3.5
    Checking futures-io v0.3.5
    Checking base64 v0.11.0
    Checking pin-utils v0.1.0
    Checking ppv-lite86 v0.2.8
    Checking openssl-probe v0.1.2
    Checking bytes v0.5.5
    Checking pin-project-lite v0.1.7
    Checking futures-task v0.3.5
    Checking tracing-core v0.1.10
   Compiling proc-macro-error-attr v1.0.2
   Compiling proc-macro-error v1.0.2
    Checking futures-channel v0.3.5
   Compiling quote v1.0.7
   Compiling ring v0.16.15
    Checking iovec v0.1.4
    Checking net2 v0.2.34
    Checking rand_core v0.5.1
    Checking mio v0.6.22
    Checking rand_chacha v0.2.2
    Checking rand v0.7.3
    Checking tokio v0.2.21
    Checking sct v0.6.0
    Checking webpki v0.21.3
    Checking ct-logs v0.6.0
    Checking rustls v0.17.0
   Compiling syn-mid v0.5.0
   Compiling synstructure v0.12.4
    Checking rustls-native-certs v0.3.0
   Compiling futures-macro v0.3.5
   Compiling tracing-attributes v0.1.8
   Compiling err-derive v0.2.4
    Checking tracing v0.1.15
    Checking pin-project v0.4.22
    Checking futures-util v0.3.5
    Checking quinn-proto v0.6.1 (https://github.com/djc/quinn#b5c8a218)
error[E0432]: unresolved import `rustls::quic::PacketKey`
  --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:13:27
   |
13 |     quic::{ClientQuicExt, PacketKey, ServerQuicExt},
   |                           ^^^^^^^^^ no `PacketKey` in `quic`

error[E0433]: failed to resolve: could not find `Keys` in `quic`
  --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:62:34
   |
62 |         let keys = rustls::quic::Keys::initial(&salt, dst_cid, side.is_client());
   |                                  ^^^^ could not find `Keys` in `quic`

error[E0599]: no method named `get_0rtt_keys` found for reference `&crypto::rustls::TlsSession` in the current scope
  --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:93:25
   |
93 |         let keys = self.get_0rtt_keys()?;
   |                         ^^^^^^^^^^^^^ method not found in `&crypto::rustls::TlsSession`

error[E0609]: no field `local` on type `rustls::quic::Secrets`
   --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:161:29
    |
161 |                 local: keys.local.header,
    |                             ^^^^^ unknown field
    |
    = note: available fields are: `client`, `server`

error[E0609]: no field `remote` on type `rustls::quic::Secrets`
   --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:162:30
    |
162 |                 remote: keys.remote.header,
    |                              ^^^^^^ unknown field
    |
    = note: available fields are: `client`, `server`

error[E0609]: no field `local` on type `rustls::quic::Secrets`
   --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:165:29
    |
165 |                 local: keys.local.packet,
    |                             ^^^^^ unknown field
    |
    = note: available fields are: `client`, `server`

error[E0609]: no field `remote` on type `rustls::quic::Secrets`
   --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:166:30
    |
166 |                 remote: keys.remote.packet,
    |                              ^^^^^^ unknown field
    |
    = note: available fields are: `client`, `server`

error[E0599]: no method named `next_1rtt_keys` found for trait object `(dyn rustls::session::Session + 'static)` in the current scope
   --> /home/thavlik/.cargo/git/checkouts/quinn-572d2e5812b43165/b5c8a21/quinn-proto/src/crypto/rustls.rs:172:29
    |
172 |         let keys = (**self).next_1rtt_keys();
    |                             ^^^^^^^^^^^^^^ method not found in `(dyn rustls::session::Session + 'static)`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `next_1rtt_keys`, perhaps you need to implement it:
            candidate #1: `crypto::Session`

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0432, E0433, E0599, E0609.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `quinn-proto`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@Ralith
Copy link
Collaborator

Ralith commented Jun 21, 2020

This is because master relies on unreleased changes to rustls, and a direct dependency on a git version is complicated as it would break the interface to upstream crates. You can work around the issue for now by copying the following clause from quinn's root Cargo.toml into your own project:

[patch.crates-io]
rustls = { git = "https://github.com/ctz/rustls", rev = "46c259bd8e28dcfca6c1934aabb58a0da0736cb7" }

@thavlik thavlik closed this as completed Jun 21, 2020
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