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

Fix Linux compilation failing due to infinite recursion #548

Conversation

itsjunetime
Copy link
Contributor

Right now, on current main, I can't compile psst-gui due to an issue with overflowing trait requirements:

error[E0275]: overflow evaluating the requirement `sized_chunks::sized_chunk::Chunk<TrackLines>: std::marker::Sync`
   --> psst-gui/src/ui/search.rs:52:6
    |
52  |     .on_command_async(
    |      ^^^^^^^^^^^^^^^^
    |
    = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`psst_gui`)
    = note: required for `std::sync::Arc<sized_chunks::sized_chunk::Chunk<TrackLines>>` to implement `Send`
note: required because it appears within the type `im::fakepool::Arc<sized_chunks::sized_chunk::Chunk<TrackLines>>`
   --> /home/june/.cargo/registry/src/index.crates.io-6f17d22bba15001f/im-15.1.0/./src/fakepool.rs:128:19
    |
128 | pub(crate) struct Arc<A>(RArc<A>);
    |                   ^^^
note: required because it appears within the type `im::nodes::rrb::Entry<TrackLines>`
   --> /home/june/.cargo/registry/src/index.crates.io-6f17d22bba15001f/im-15.1.0/./src/nodes/rrb.rs:162:6
    |
162 | enum Entry<A> {
    |      ^^^^^
note: required because it appears within the type `im::nodes::rrb::Node<TrackLines>`
   --> /home/june/.cargo/registry/src/index.crates.io-6f17d22bba15001f/im-15.1.0/./src/nodes/rrb.rs:244:19
    |
244 | pub(crate) struct Node<A> {
    |                   ^^^^
note: required because it appears within the type `sized_chunks::types::SizeOdd<im::nodes::rrb::Node<TrackLines>, ()>`
   --> /home/june/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sized-chunks-0.6.5/src/types.rs:36:12
    |
36  | pub struct SizeOdd<A, B> {
    |            ^^^^^^^
note: required because it appears within the type `sized_chunks::types::SizeEven<im::nodes::rrb::Node<TrackLines>, sized_chunks::types::SizeOdd<im::nodes::rrb::Node<TrackLines>, ()>>`
   --> /home/june/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sized-chunks-0.6.5/src/types.rs:28:12
    |
28  | pub struct SizeEven<A, B> {
    |            ^^^^^^^^
note: required because it appears within the type `sized_chunks::types::SizeEven<im::nodes::rrb::Node<TrackLines>, sized_chunks::types::SizeEven<im::nodes::rrb::Node<TrackLines>, sized_chunks::types::SizeOdd<im::nodes::rrb::Node<TrackLines>, ()>>>`

It seems that switching this Vector to an Arc<[]> fixes the compilation issue. It also runs fine and I've verified that I can listen to music and view lyrics and such with this change. I'm not super familiar with druid, so I'm not certain if this Vector is needed for any sort of reactivity or whatever, but it seems to work fine for me.

@jacksongoode
Copy link
Collaborator

Thanks for this, I just noticed it today as well!

@jacksongoode jacksongoode merged commit e5735d1 into jpochyla:main Oct 23, 2024
8 checks passed
@jacksongoode jacksongoode changed the title Fix issue with compilation failing due to infinite recursion when trying to satisfy Send bound Fix Linux compilation failing due to infinite recursion Oct 23, 2024
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

Successfully merging this pull request may close these issues.

2 participants