Failed to compile v1.4.3 on rustc 1.76.0

オープン
#465 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
cli

調査の方向性

rustc 1.76.0 で cargo install oha を実行して失敗を再現し、その後、629 行目の redirect 周辺にある src/client.rs を調査します。再帰的な async 関数をプロジェクトの現在の互換性要件と比較します。完了の条件は、報告された Rust バージョンで oha のコンパイルが成功することです。

索引モデルが issue の本文から書いたものです。

説明

user@debian:~$ cargo install oha
    Updating crates.io index
  Downloaded oha v1.4.3
  Downloaded 1 crate (757.7 KB) in 1.83s
  Installing oha v1.4.3
    Updating crates.io index
[[ ... Many lines of downloading and compiling dependencies ... ]]
   Compiling oha v1.4.3
error[E0733]: recursion in an `async fn` requires boxing
   --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/oha-1.4.3/src/client.rs:629:5
    |
629 | /     async fn redirect<R: Rng + Send>(
630 | |         &self,
631 | |         send_request: SendRequestHttp1,
632 | |         base_url: &Url,
...   |
635 | |         rng: &mut R,
636 | |     ) -> Result<(SendRequestHttp1, http::StatusCode, usize), ClientError> {
    | |_________________________________________________________________________^ recursive `async fn`
    |
    = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
    = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion

For more information about this error, try `rustc --explain E0733`.
error: could not compile `oha` (bin "oha") due to 1 previous error
error: failed to compile `oha v1.4.3`, intermediate artifacts can be found at `/tmp/cargo-installZcfcP7`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

If there's any help it in, my system is:

user@debian:~$ rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
user@debian:~$ uname -a
Linux debian 6.1.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) x86_64 GNU/Linux
user@debian:~$ lsb_release -d
No LSB modules are available.
Description:    Debian GNU/Linux trixie/sid
主要言語
Rust
スター
10.7k
フォーク
311
平均マージ
24分
マージ済み PR(30日)
6

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hatoo/oha のほかの issue

hatoo/oha の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。