HookedBehemoth / neuters

Reuters Redirect and Proxy
https://neuters.de/
GNU Affero General Public License v3.0
90 stars 7 forks source link

Rust compilation failure (Docker) #25

Closed cadusilva closed 1 year ago

cadusilva commented 1 year ago

Hello, every time I try to compile Neuters, it ends with this error. Prior to (...), everything runs fine until it doesn't.

(...)
#0 83.13    Compiling tl v0.7.7
#0 93.50 error[E0308]: mismatched types
#0 93.50    --> src/main.rs:69:52
#0 93.50     |
#0 93.50 69  |         client_builder = client_builder.tls_config(tls_config).redirects(0);
#0 93.50     |                                         ---------- ^^^^^^^^^^ expected `ClientConfig`, found a different `ClientConfig`
#0 93.50     |                                         |
#0 93.50     |                                         arguments to this method are incorrect
#0 93.50     |
#0 93.50     = note: `ClientConfig` and `ClientConfig` have similar names, but are actually distinct types
#0 93.50 note: `ClientConfig` is defined in crate `rustls`
#0 93.50    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.20.8/src/client/client_conn.rs:91:1
#0 93.50     |
#0 93.50 91  | pub struct ClientConfig {
#0 93.50     | ^^^^^^^^^^^^^^^^^^^^^^^
#0 93.50 note: `ClientConfig` is defined in crate `rustls`
#0 93.50    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.21.2/src/client/client_conn.rs:125:1
#0 93.50     |
#0 93.50 125 | pub struct ClientConfig {
#0 93.50     | ^^^^^^^^^^^^^^^^^^^^^^^
#0 93.50     = note: perhaps two different versions of crate `rustls` are being used?
#0 93.50 note: method defined here
#0 93.50    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/ureq-2.7.1/src/agent.rs:593:12
#0 93.50     |
#0 93.50 593 |     pub fn tls_config(mut self, tls_config: Arc<rustls::ClientConfig>) -> Self {
#0 93.50     |            ^^^^^^^^^^
#0 93.50
#0 93.52 For more information about this error, try `rustc --explain E0308`.
#0 93.53 error: could not compile `neuters` (bin "neuters") due to previous error
#0 93.60 error: failed to compile `neuters v0.1.1 (/build)`, intermediate artifacts can be found at `/build/target`
------
Dockerfile:9
--------------------
   7 |     COPY . .
   8 |
   9 | >>> RUN cargo install --path .
  10 |
  11 |     # Final Image
--------------------
ERROR: failed to solve: process "/bin/sh -c cargo install --path ." did not complete successfully: exit code: 101

System info:

Thank you.

HookedBehemoth commented 1 year ago

Updated the dependencies and pushed the lock file. This shouldn't happen again.

cadusilva commented 1 year ago

Updated the dependencies and pushed the lock file. This shouldn't happen again.

Thank you! The problem was solved.