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

error: could not compile azalea-protocol (lib) -> nightly #133243

Closed
Satanaelcode opened this issue Nov 20, 2024 · 6 comments
Closed

error: could not compile azalea-protocol (lib) -> nightly #133243

Satanaelcode opened this issue Nov 20, 2024 · 6 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Satanaelcode
Copy link

Code

use azalea::prelude::*;
use azalea::auth::MicrosoftCredentials;

#[tokio::main]
async fn main() {
    let email = "***********@*****.***";
    let password = "**********"; 

    // Authenticate using Microsoft credentials
    let credentials = MicrosoftCredentials::new(email, password).await.unwrap();

    // Connect to the Minecraft server
    let server_address = "127.0.0.1:25565";
    let mut client = Client::connect(server_address, credentials).await.unwrap();

    // Join the game
    client.join().await.unwrap();
    
    println!("Successfully connected to the server!");
}

Meta

rustc --version --verbose:

rustc 1.84.0-nightly (ee612c45f 2024-11-19)
binary: rustc
commit-hash: ee612c45f00391aff71ec0c52b7fc08fae18c711
commit-date: 2024-11-19
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3

Error output

error: internal compiler error: Encountered anon const with inference variable args but no error reported
  |
  = note: delayed at compiler/rustc_trait_selection/src/traits/mod.rs:592:27 - disabled backtrace

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 make sure that you have updated to the latest nightly

note: please attach the file at `/home/eugaming/.cargo/git/checkouts/azalea-cdffe42e9d507c39/3cf17cb/azalea-protocol/rustc-ice-2024-11-20T12_19_20-26605.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `azalea-protocol` (lib)

Caused by:
  process didn't exit successfully: `/home/eugaming/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name azalea_protocol --edition=2021 /home/eugaming/.cargo/git/checkouts/azalea-cdffe42e9d507c39/3cf17cb/azalea-protocol/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=284 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on --cfg 'feature="connecting"' --cfg 'feature="default"' --cfg 'feature="packets"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("connecting", "default", "packets"))' -C metadata=cf6dd239e15a3480 -C extra-filename=-cf6dd239e15a3480 --out-dir /home/eugaming/Dokumente/proj/target/debug/deps -L dependency=/home/eugaming/Dokumente/botter/target/debug/deps --extern async_recursion=/home/eugaming/Dokumente/proj/target/debug/deps/libasync_recursion-83c87b162e2fc395.so --extern azalea_auth=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_auth-703d8a21aec769ff.rmeta --extern azalea_block=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_block-ce3a8309ff869209.rmeta --extern azalea_brigadier=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_brigadier-ac0c89cf787f07be.rmeta --extern azalea_buf=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_buf-fc350bf3e6a16204.rmeta --extern azalea_chat=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_chat-574b11e93f5235d9.rmeta --extern azalea_core=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_core-ed6e2cf230dbce8a.rmeta --extern azalea_crypto=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_crypto-c9bb3aa48a4cdb0f.rmeta --extern azalea_entity=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_entity-4f764b67c5ba08ac.rmeta --extern azalea_inventory=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_inventory-94f4c03be07c7e8b.rmeta --extern azalea_protocol_macros=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_protocol_macros-e6fcd932f87965d8.so --extern azalea_registry=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_registry-1a8da8145af6ff12.rmeta --extern azalea_world=/home/eugaming/Dokumente/proj/target/debug/deps/libazalea_world-7a3b108e7ecd3d76.rmeta --extern bevy_ecs=/home/eugaming/Dokumente/proj/target/debug/deps/libbevy_ecs-182992854b758b28.rmeta --extern byteorder=/home/eugaming/Dokumente/proj/target/debug/deps/libbyteorder-52132fb849f264b8.rmeta --extern bytes=/home/eugaming/Dokumente/proj/target/debug/deps/libbytes-2cffc00d9056eb48.rmeta --extern flate2=/home/eugaming/Dokumente/proj/target/debug/deps/libflate2-f767f1cdad1e5f31.rmeta --extern futures=/home/eugaming/Dokumente/proj/target/debug/deps/libfutures-d5e41ab096eda850.rmeta --extern futures_lite=/home/eugaming/Dokumente/proj/target/debug/deps/libfutures_lite-16ae4d7194958991.rmeta --extern futures_util=/home/eugaming/Dokumente/proj/target/debug/deps/libfutures_util-935b966f0ef8298b.rmeta --extern log=/home/eugaming/Dokumente/proj/target/debug/deps/liblog-cc5828a3fd5d2e84.rmeta --extern serde=/home/eugaming/Dokumente/proj/target/debug/deps/libserde-90598372d8602c90.rmeta --extern serde_json=/home/eugaming/Dokumente/proj/target/debug/deps/libserde_json-3fc0a3db492ceb70.rmeta --extern simdnbt=/home/eugaming/Dokumente/proj/target/debug/deps/libsimdnbt-dc08c17a6bfa3daf.rmeta --extern socks5_impl=/home/eugaming/Dokumente/proj/target/debug/deps/libsocks5_impl-4407e88e44840e19.rmeta --extern thiserror=/home/eugaming/Dokumente/proj/target/debug/deps/libthiserror-ecad2ec7ea18b6b6.rmeta --extern tokio=/home/eugaming/Dokumente/proj/target/debug/deps/libtokio-e6affadb10729968.rmeta --extern tokio_util=/home/eugaming/Dokumente/proj/target/debug/deps/libtokio_util-be1ada6858d2146c.rmeta --extern tracing=/home/eugaming/Dokumente/proj/target/debug/deps/libtracing-8fb90796b56e9d06.rmeta --extern trust_dns_resolver=/home/eugaming/Dokumente/proj/target/debug/deps/libtrust_dns_resolver-0f7c806dd9ecae76.rmeta --extern uuid=/home/eugaming/Dokumente/proj/target/debug/deps/libuuid-e1d906fc6f65e77f.rmeta --cap-lints allow -L native=/home/eugaming/Dokumente/proj/target/debug/build/ring-16a5eab249289873/out` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
Backtrace

error: internal compiler error: Encountered anon const with inference variable args but no error reported
  |
  = note: delayed at compiler/rustc_trait_selection/src/traits/mod.rs:592:27
             0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             7: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             8: <rustc_middle::ty::InstantiatedPredicates as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::instantiate_value_path
            10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            16: rustc_hir_typeck::check::check_fn
            17: rustc_hir_typeck::typeck
            18: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            19: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            20: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            21: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            22: rustc_hir_analysis::check_crate
            23: rustc_interface::passes::run_required_analyses
            24: rustc_interface::passes::analysis
            25: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            26: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            27: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            28: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            29: std::sys::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#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            30: <<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#1}, 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}
            31: std::sys::pal::unix::thread::Thread::new::thread_start
            32: <unknown>
            33: <unknown>
          

error: internal compiler error: Encountered anon const with inference variable args but no error reported
  |
  = note: delayed at compiler/rustc_trait_selection/src/traits/mod.rs:592:27
             0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_middle::ty::InstantiatedPredicates as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             7: <rustc_hir_typeck::fn_ctxt::FnCtxt>::instantiate_value_path
             8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            14: rustc_hir_typeck::check::check_fn
            15: rustc_hir_typeck::typeck
            16: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::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_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            18: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            19: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            20: rustc_hir_analysis::check_crate
            21: rustc_interface::passes::run_required_analyses
            22: rustc_interface::passes::analysis
            23: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            24: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            25: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            26: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            27: std::sys::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#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            28: <<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#1}, 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}
            29: std::sys::pal::unix::thread::Thread::new::thread_start
            30: <unknown>
            31: <unknown>
          

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 make sure that you have updated to the latest nightly

note: please attach the file at `/home/eugaming/.cargo/git/checkouts/azalea-cdffe42e9d507c39/3cf17cb/azalea-protocol/rustc-ice-2024-11-20T12_26_38-29086.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `azalea-protocol` (lib)

@Satanaelcode Satanaelcode added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 20, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 20, 2024
@jieyouxu
Copy link
Member

Thanks for the report, this is a duplicate of #133199.

@jieyouxu jieyouxu closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 20, 2024
@jieyouxu
Copy link
Member

Actually @Satanaelcode, could you kindly share your Cargo.toml for the azalea-protocol versions?

@jieyouxu jieyouxu reopened this Nov 20, 2024
@jieyouxu jieyouxu added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example S-needs-info Status: The issue lacks details necessary to triage or act on it. labels Nov 20, 2024
@jieyouxu
Copy link
Member

Found out: cargo check on

[dependencies]
azalea = { git = "https://github.com/azalea-rs/azalea", version = "=0.10.3+mc1.21.1" }

@jieyouxu jieyouxu removed the S-needs-info Status: The issue lacks details necessary to triage or act on it. label Nov 20, 2024
@lqd
Copy link
Member

lqd commented Nov 20, 2024

At the very least the latest version reproduces the issue, and that's azalea-protocol-0.10.3+mc1.21.1.

These crates have buggy nightly detection so it needs to be worked around to bisect, but the ICE is quite recent: it started in #132927.

On the rollup's parent 9a9dadd and earlier, the example emits errors instead

error[E0432]: unresolved import `azalea::auth::MicrosoftCredentials`
 --> src/main.rs:2:5
  |
2 | use azalea::auth::MicrosoftCredentials;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `MicrosoftCredentials` in the root

error[E0599]: no function or associated item named `connect` found for struct `azalea::Client` in the current scope
   --> src/main.rs:14:30
    |
14  |     let mut client = Client::connect(server_address, credentials).await.unwrap();
    |                              ^^^^^^^ function or associated item not found in `Client`
    |
note: if you're trying to build a new `azalea::Client`, consider using `azalea::Client::new` which returns `azalea::Client`
   --> /home/lqd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/azalea-client-0.10.3+mc1.21.1/src/client.rs:185:5
    |
185 | /     pub fn new(
186 | |         profile: GameProfile,
187 | |         entity: Entity,
188 | |         ecs: Arc<Mutex<World>>,
189 | |         run_schedule_sender: mpsc::UnboundedSender<()>,
190 | |     ) -> Self {
    | |_____________^
help: there is a method `disconnect` with a similar name, but with different arguments
   --> /home/lqd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/azalea-client-0.10.3+mc1.21.1/src/client.rs:506:5
    |
506 |     pub fn disconnect(&self) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 20, 2024

Working on minizing this, got it down to something about the azalea-protocol-macros. EDIT: got it down to 3 crates

  "azalea-protocol",
  "azalea-core",
  "azalea-buf",

seems to have something to do with FixedBitSet-related code.

@jieyouxu
Copy link
Member

Ok got it, posting MCVE on the other issue.

@jieyouxu jieyouxu closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2024
@jieyouxu jieyouxu removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants