Cross compilation of server fails with async_trait

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

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

評価

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

調査の方向性

Reproduce the server cross-compilation failure with cargo-zigbuild, then inspect the async trait declarations in crates/middleware/src/logseq.rs, crates/middleware/src/ripgrep.rs, and crates/middleware/src/lib.rs. The work is done when the cross-compilation completes without the E0706 errors shown in the report.

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

説明

Compiling using https://hub.docker.com/r/messense/cargo-zigbuild fails with

error[E0706]: functions in traits cannot be declared `async`
  --> crates/middleware/src/logseq.rs:36:5
   |
36 |     async fn build_knowledge_graph(&self, resource: impl Read) -> Result<Thesaurus>;
   |     -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     `async` because of this
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0706]: functions in traits cannot be declared `async`
  --> crates/middleware/src/logseq.rs:45:5
   |
45 |       async fn index(
   |       ^----
   |       |
   |  _____`async` because of this
   | |
46 | |         &mut self,
47 | |         needle: String,
48 | |         haystack: String,
49 | |     ) -> Result<AHashMap<String, Article>> {
   | |__________________________________________^
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0706]: functions in traits cannot be declared `async`
  --> crates/middleware/src/ripgrep.rs:37:5
   |
37 |       async fn index(
   |       ^----
   |       |
   |  _____`async` because of this
   | |
38 | |         &mut self,
39 | |         needle: String,
40 | |         haystack: String,
41 | |     ) -> Result<AHashMap<String, Article>> {
   | |__________________________________________^
   |
   = note: `async` trait functions are not currently supported
   = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0706]: functions in traits cannot be declared `async`
   --> crates/middleware/src/lib.rs:145:5
    |
145 |       async fn index(
    |       ^----
    |       |
    |  _____`async` because of this
    | |
146 | |         &mut self,
147 | |         needle: String,
148 | |         haystack: String,
149 | |     ) -> Result<AHashMap<String, Article>>;
    | |___________________________________________^
    |
    = note: `async` trait functions are not currently supported
    = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

For more information about this error, try `rustc --explain E0706`.
error: could not compile `terraphim_middleware` (lib) due to 4 previous errors

主要言語
Rust
スター
62
フォーク
5
平均マージ
2時間 27分
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

terraphim/terraphim-ai のほかの issue

terraphim/terraphim-ai の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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