Closed
Description
I tried this code:
https://github.com/PolyMeilex/rfd/tree/0.11.4
with
cargo build --example simple --release --no-default-features --features xdg-portal
seems like it would basically hang on the following code
Box::pin(async {
OpenFileRequest::default()
.accept_label("Pick file")
.multiple(false)
.title(&*self.title.unwrap_or_else(|| "Pick a file".to_string()))
.filters(self.filters.into_iter().map(From::from))
.send()
.await
.ok()
.and_then(|request| request.response().ok())
.and_then(|response| {
response
.uris()
.get(0)
.and_then(|uri| uri.to_file_path().ok())
})
.map(FileHandle::from)
})
with RUSTC_LOG=TRACE
hangs here
INFO rustc_trait_selection::traits::query::normalize normalize::<rustc_middle::ty::subst::GenericArg>: result=Ok(std::vec::IntoIter<T, A>) with 0 obligations
┐rustc_trait_selection::traits::project::normalize_with_depth_to depth=1, value=Binder { value: TraitPredicate(<[closure@src/backend/xdg_desktop_portal.rs:36:18: 36:35] as std::marker::Freeze>, polarity:Positive), bound_vars: [] }
┘
┐rustc_trait_selection::traits::project::normalize_with_depth_to depth=1, value=()
┘
┐rustc_trait_selection::traits::project::normalize_with_depth_to depth=1, value=Binder { value: TraitPredicate(<std::pin::Pin<&mut [async block@src/backend/xdg_desktop_portal.rs:43:18: 60:10]> as std::marker::Freeze>, polarity:Positive), bound_vars: [] }
I expected to see this happen: rustc 1.71.1 finishes same command above within 10 seconds
Compiling zbus v3.14.1
Compiling futures-executor v0.3.28
Compiling futures v0.3.28
Compiling ashpd v0.6.2
Finished release [optimized] target(s) in 9.99s
Instead, this happened: rustc 1.72.0 stuck at compiling rfd
for more than 5 minutes
...
Compiling futures v0.3.28
Compiling ashpd v0.6.2
Building [=======================> ] 154/156: rfd
Note that only --release
build hangs, dev
profile build works fine
Meta
rustc --version --verbose
:
rustc 1.71.1 (eb26296b5 2023-08-03)
binary: rustc
commit-hash: eb26296b556cef10fb713a38f3d16b9886080f26
commit-date: 2023-08-03
host: x86_64-unknown-linux-gnu
release: 1.71.1
LLVM version: 16.0.5
rustc 1.72.0 (5680fa18f 2023-08-23)
binary: rustc
commit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be
commit-date: 2023-08-23
host: x86_64-unknown-linux-gnu
release: 1.72.0
LLVM version: 16.0.5
Backtrace
No backtrace as it just hangs. Rustc trace level log provided though.
https://github.com/rust-lang/rust/files/12438619/rustc-trace.zip