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

Nightly compiler error compiling wayland-protocols v0.6.6 with rustc 1.76.0-nightly (3f28fe133 2023-12-18) #684

Closed
andrewdavidmackenzie opened this issue Dec 19, 2023 · 4 comments

Comments

@andrewdavidmackenzie
Copy link

I have a nightly CI job that has started to fail running clippy, due to a compiler error compiling wayland-protocols.

The dependency chain is down from iced thru "clipboard_wayland" (0.2.0) to "smithay-clipboard" (0.6.6).

"clipboard_wayland" 0.2.0 is the latest version on crates.io, but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on crates.io.

I am not sure whether to pursue an update to "smithay-clipboard" 0.7.0 in "clipboard_wayland" in the hope that fixes it, or it's a compiler issue affecting multiple versions that I should pursue in rustc.

> rustc --version
rustc 1.76.0-nightly (3f28fe133 2023-12-18)
| error: internal compiler error: no errors encountered even though `span_delayed_bug` issued
| 
| error: internal compiler error: Trying to feed an already recorded value for query visibility key=DefId(0:6977 ~ wayland_protocols[6542]::unstable::xdg_decoration::v1::generated::client::{use#18}):
|                                 old value: Restricted(DefId(0:0 ~ wayland_protocols[6542]))
|                                 new value: Restricted(DefId(0:6958 ~ wayland_protocols[6542]::unstable::xdg_decoration::v1::generated::client))
|   |
|   = note: delayed at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/compiler/rustc_middle/src/query/mod.rs:2206:1
|              0: <rustc_errors::DiagCtxtInner>::emit_diagnostic_without_consuming
|              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
|              2: <rustc_session::session::Session>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
|              3: <rustc_resolve::Resolver>::feed_visibility
|              4: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              5: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              6: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              7: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|              8: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              9: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|             10: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|             11: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
|             12: <rustc_expand::expand::MacroExpander>::collect_invocations
|             13: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
|             14: <rustc_expand::expand::MacroExpander>::expand_crate
|             15: rustc_interface::passes::resolver_for_lowering
|             16: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
|             17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
|             18: rustc_query_impl::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
|             19: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}
|             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
|             22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             23: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             24: std::sys::unix::thread::Thread::new::thread_start
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/std/src/sys/unix/thread.rs:108:17
|             25: <unknown>
|             26: __clone
|           
| 
| error: internal compiler error: Trying to feed an already recorded value for query visibility key=DefId(0:12939 ~ wayland_protocols[6542]::wlr::unstable::input_inhibitor::v1::generated::client::{use#18}):
|                                 old value: Restricted(DefId(0:0 ~ wayland_protocols[6542]))
|                                 new value: Restricted(DefId(0:12920 ~ wayland_protocols[6542]::wlr::unstable::input_inhibitor::v1::generated::client))
|   |
|   = note: delayed at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/compiler/rustc_middle/src/query/mod.rs:2206:1
|              0: <rustc_errors::DiagCtxtInner>::emit_diagnostic_without_consuming
|              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
|              2: <rustc_session::session::Session>::span_delayed_bug::<rustc_span::span_encoding::Span, alloc::string::String>
|              3: <rustc_resolve::Resolver>::feed_visibility
|              4: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              5: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_use_tree
|              6: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              7: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|              8: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|              9: rustc_ast::visit::walk_item::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
|             10: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
|             11: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
|             12: <rustc_expand::expand::MacroExpander>::collect_invocations
|             13: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
|             14: <rustc_expand::expand::MacroExpander>::expand_crate
|             15: rustc_interface::passes::resolver_for_lowering
|             16: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
|             17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
|             18: rustc_query_impl::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
|             19: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}
|             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
|             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
|             22: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             23: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/alloc/src/boxed.rs:2015:9
|             24: std::sys::unix::thread::Thread::new::thread_start
|                        at /rustc/3f28fe133475ec5faf3413b556bf3cfb0d51336c/library/std/src/sys/unix/thread.rs:108:17
|             25: <unknown>
|             26: __clone
|           
| 
| note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
| 
| note: please attach the file at `/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-protocols-0.29.5/rustc-ice-2023-12-19T17_29_19-7729.txt` to your bug report
| 
| note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C instrument-coverage
| 
| note: some of the compiler flags provided by cargo are hidden
| 
| query stack during panic:
| end of query stack
| error: could not compile `wayland-protocols` (lib)

@kchibisov
Copy link
Member

Bring this straight to rustc, it's ICE as you can see, nothing to do with this crate other than it triggers ICE.

@ids1024
Copy link
Member

ids1024 commented Dec 19, 2023

I am not sure whether to pursue an update to "smithay-clipboard" 0.7.0 in "clipboard_wayland" in the hope that fixes it, or it's a compiler issue affecting multiple versions that I should pursue in rustc.

hecrj/window_clipboard#23 has an update for clipboard_wayland.

But an internal compiler error is always a Rustc bug.

@andrewdavidmackenzie
Copy link
Author

Reported here: rust-lang/rust#119126

I guess you can leave open to track the issue/fix, or close - as you prefer.

@elinorbgr
Copy link
Member

Looks like the rustc bug is fixed, so I'm going to close this. Thanks everyone.

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

No branches or pull requests

4 participants