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

chore: fix CI error; use docker compose instead of old style and new rust version #72

Merged
merged 2 commits into from
Aug 17, 2024

Conversation

Miyoshi-Ryota
Copy link
Owner

@Miyoshi-Ryota Miyoshi-Ryota commented Aug 17, 2024

No description provided.

On the CI image, ubuntu-latest uses the latest version of Docker,
which no longer supports the old-style docker-compose command.
a following error happens if we use v1.71.0 to compile:
error[E0659]: `cbc` is ambiguous
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:26:5
   |
26 | use cbc::CbcWrapper;
   |     ^^^ ambiguous name
   |
   = note: ambiguous because of multiple potential import sources
   = note: `cbc` could refer to a crate passed with `--extern`
   = help: use `::cbc` to refer to this crate unambiguously
note: `cbc` could also refer to the module defined here
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:38:1
   |
38 | pub(crate) mod cbc;
   | ^^^^^^^^^^^^^^^^^^^
   = help: use `self::cbc` to refer to this module unambiguously

error: future cannot be sent between threads safely
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/server/mod.rs:683:29
    |
683 |     let join = tokio::spawn(session.run(stream, handler));
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `run` is not `Send`
    |
    = help: the trait `for<'a> std::marker::Sync` is not implemented for `(dyn cipher::OpeningKey + std::marker::Send + 'a)`
note: future is not `Send` as this value is used across an await
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:265:10
    |
264 |         .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..])
    |                                        ------ has type `&(dyn cipher::OpeningKey + std::marker::Send + 'a)` which is not `Send`
265 |         .await?;
    |          ^^^^^ - `cipher` is later dropped here
    |          |
    |          await occurs here, with `cipher` maybe used later
help: consider moving this into a `let` binding to create a shorter lived borrow
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:264:40
    |
264 |         .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..])
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `tokio::spawn`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/task/spawn.rs:167:21
    |
165 |     pub fn spawn<F>(future: F) -> JoinHandle<F::Output>
    |            ----- required by a bound in this function
166 |     where
167 |         F: Future + Send + 'static,
    |                     ^^^^ required by this bound in `spawn`

error: future cannot be sent between threads safely
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/client/mod.rs:723:29
    |
723 |     let join = tokio::spawn(session.run(stream, handler, Some(encrypted_signal)));
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `run` is not `Send`
    |
    = help: the trait `for<'a> std::marker::Sync` is not implemented for `(dyn cipher::OpeningKey + std::marker::Send + 'a)`
note: future is not `Send` as this value is used across an await
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:265:10
    |
264 |         .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..])
    |                                        ------ has type `&(dyn cipher::OpeningKey + std::marker::Send + 'a)` which is not `Send`
265 |         .await?;
    |          ^^^^^ - `cipher` is later dropped here
    |          |
    |          await occurs here, with `cipher` maybe used later
help: consider moving this into a `let` binding to create a shorter lived borrow
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/russh-0.45.0/src/cipher/mod.rs:264:40
    |
264 |         .read_exact(&mut buffer.buffer[cipher.packet_length_to_read_for_block_length()..])
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `tokio::spawn`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.39.2/src/task/spawn.rs:167:21
    |
165 |     pub fn spawn<F>(future: F) -> JoinHandle<F::Output>
    |            ----- required by a bound in this function
166 |     where
167 |         F: Future + Send + 'static,
    |                     ^^^^ required by this bound in `spawn`

For more information about this error, try `rustc --explain E0659`.
error: could not compile `russh` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
@Miyoshi-Ryota Miyoshi-Ryota changed the title chore: replace docker-compose to docker compose chore: fix CI error; use docker compose instead of old style and new rust version. Aug 17, 2024
@Miyoshi-Ryota Miyoshi-Ryota changed the title chore: fix CI error; use docker compose instead of old style and new rust version. chore: fix CI error; use docker compose instead of old style and new rust version Aug 17, 2024
@Miyoshi-Ryota Miyoshi-Ryota merged commit 0241f91 into main Aug 17, 2024
14 checks passed
@Miyoshi-Ryota Miyoshi-Ryota deleted the fix-ci branch August 17, 2024 13:13
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

Successfully merging this pull request may close these issues.

1 participant