Open leon3s opened 20 hours ago
as simplest solution you can add #![recursion_limit = "256"]
to lib.rs or main.rs
I will check types
could you poss full output of the compiler
This is only what i have:
error: queries overflow the depth limit! --> /home/ubuntu/.rustup/toolchains/1.82.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec.rs:104:5 | 104 | pub const NEW: Self = Self::new(); | ^^^^^^^^^^^^^^^^^^^ |
---|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`nanocld`)
= note: query depth increased by 130 when computing layout of `ntex_util::future::MaybeDone<{async fn body of ntex_service::pipeline::Pipeline<&ntex::http::h2::service::PublishService<ntex::web::app_service::AppFactoryService<ntex::web::stack::WebMiddleware<ntex::web::middleware::logger::LoggerMiddleware<ntex::web::stack::WebMiddleware<nanocl_utils::ntex::middlewares::serialize_error::SerializeErrorMiddleware<ntex::web::stack::WebMiddleware<nanocl_utils::ntex::middlewares::versioning::VersioningMiddleware<ntex::web::stack::WebMiddleware<ntex_cors::CorsMiddleware<ntex::web::app_service::AppService<ntex::web::app::Filter<ntex::web::error_default::DefaultError>, ntex::web::error_default::DefaultError>>, ntex::web::error_default::DefaultError>>, ntex::web::error_default::DefaultError>>, ntex::web::error_default::DefaultError>>, ntex::web::error_default::DefaultError>, ntex::web::error_default::DefaultError>, ntex::http::body::Body, ntex::http::h1::default::DefaultControlService>>::call<ntex_h2::message::Message>()}>`
error: could not compile nanocld
(bin "nanocld") due to 1 previous error
Maybe it's a rust bug ? because as i said im able to make the same code compile by just commenting and uncommenting one line..
could you try different version of rust?
i tried with 1.78, 1.79, 1.80, 1.81 and 1.82 and i still have the issue. I cannot go lower then 1.78 as the latest version of diesel request 1.78 or more.
what project are you trying to build?
I can probably create a repository to reproduce the problem
I was able to reproduce it with on this small repository:
And this is the code of my middlewares: https://github.com/next-hat/nanocl/tree/nightly/crates/nanocl_utils/src/ntex/middlewares
But i dont do anything crazy with the types
Im experiencing a compilation error while i tried to upgrade from ntex 2.7 to ntex 2.8:
It seems to come from the middlewares, if i comment the cors middleware it's compile, and if i uncomment it it's still compile, it just fail the first time. But this workarround cannot be done in the CI, any idea how i can fix this ?