-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
AddAnyAttr experimentation on AnyView #3461
base: main
Are you sure you want to change the base?
Conversation
29704da
to
3af01be
Compare
Same issue :( 10 minutes or so of compiling ends in: |
- Pre-erased `AddAnyAttr` output to `AnyView` to prevent excessive monomorphizations. - Introduced `DynValueAttr` to minimize deep generic recursion using dynamic dispatch. - Marked heavy generic functions with `#[inline(never)]` to reduce code bloat. - Ensured single dynamic call for attribute application to simplify logic and improve efficiency. This change attempts to address compile-time blow-ups and linker crashes for large projects using `AnyView` with dynamic attributes.
19f80ef
to
0db3233
Compare
Still no change unfortunately but was a good effort! I think until we get some feedback from the rust team on rust-lang/rust#130729 I'm out of ideas. That's for the compiler errors arising on leptos stable, but I'm sure this issue will have a similar root cause. |
@zakstucke Can you create a new rust lang issue about this specific AddAnyAttr implementation, include a reproduction, and then I'll see if I can poke some people I know on the Rust team. I worry the old one got too general and unfocused |
Another attempt: Add from_box constructor to avoid recursive type expansion when adding attributes to type-erased views.