Hello everyone,
I have an issue when compiling a simple Leptos (with Axum) + leptos_i18n project.
I suspect it is linked to recursive calls somewhere because at some point I had to fix the error:
Compiling server v0.1.0 (/i18n_leptos_mre/server)
error: queries overflow the depth limit!
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`server`)
= note: query depth increased by 130 when computing layout of `{async block@<leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Main, (tachys::html::class::Class<tachys::view::static_types::Static<"mt-20">>,), ((leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Header, (tachys::html::class::Class<tachys::view::static_types::Static<"absolute inset-x-0 top-0 z-50 pt-2">>,), ((tachys::html::element::HtmlElement<tachys::html::element::elements::Nav
Once fixed, using 1.84-nightly everything is fine up until adding a div
with translations macros to my home page app/src/page/home.rs
. (line 104 after the comment)
When the div
' is not commented I get this linking error
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/arnaud/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/b...
So I tried with the system's default linker using:
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Zlinker-features=-lld"]
which doesn't crash but uses around 55GB of RAM.
On stable 1.82-stable this small project also uses 50GB of RAM when building. So there seems to be a memory leak because this project has basically 1 simple page.
I know the memory leak is probably caused by code in the leptos or leptos_i18n crate, but while it's a combination of the 2, how can I figure it out?
Is the linking error something that should be posted as an issue in the rust-lang Github ?
Are these 2 problems linked ? I'm out of my depth on this one.
Can anyone replicate the error ? I'm on Ubuntu 24.04 64bit with 32GB of RAM and 128GB of swap space.
Here is the repo https://github.com/arnaudpoullet/leptos-i18n-compile-error
in the root simply run cargo build --package=server --bin=server --no-default-features