From: Tomas Volf <~@wolfsden.cz>
To: help-guix@gnu.org
Subject: How to debug a failed build of rust application under cargo-build-system?
Date: Thu, 15 Feb 2024 13:43:37 +0100 [thread overview]
Message-ID: <Zc4G-WHeJpN-tZWx@ws> (raw)
[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]
Greetings,
I am trying to package a rust application and the build fails. I am not sure
how to debug that. When I try to compile the application using `cargo install',
it does pass and build just fine. However, when I try to build the application
(imported using the cargo importer) using `guix build', I get this error:
Compiling tonic v0.10.2
error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> /tmp/guix-build-netavark-1.10.3.drv-0/netavark-1.10.3/guix-vendor/rust-tonic-0.10.2.tar.gz/src/transport/server/incoming.rs:32:45
|
28 | / async_stream::try_stream! {
29 | | tokio::pin!(incoming);
30 | |
31 | | while let Some(item) = incoming.next().await {
32 | | yield item.map(ServerIo::new_io)?
| | ^ cannot use the `?` operator in an async block that returns `()`
33 | | }
34 | | }
| |_____- this function should return `Result` or `Option` to accept `?`
|
= help: the trait `FromResidual<std::result::Result<Infallible, IE>>` is not implemented for `()`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `tonic` (lib) due to previous error
I am not know rust, but this looks like a code error? If that is the case, I do
not understand why `cargo install' works, since it should be using the same
code.
Could someone nudge me in the right direction regarding how to debug this issue?
I am not really sure where to start.
Thank you and have a nice day,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2024-02-15 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 12:43 Tomas Volf [this message]
2024-02-15 13:06 ` How to debug a failed build of rust application under cargo-build-system? woshilapin
2024-02-15 13:26 ` Tomas Volf
2024-02-15 14:42 ` Nils Landt
2024-02-15 16:23 ` Tomas Volf
2024-02-15 18:07 ` Nils Landt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zc4G-WHeJpN-tZWx@ws \
--to=~@wolfsden.cz \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.