amethyst / shred

Shared resource dispatcher
Apache License 2.0
234 stars 66 forks source link

Build with parallel feature disabled is broken in 0.9.3 #169

Closed Ralith closed 4 years ago

Ralith commented 4 years ago
error[E0433]: failed to resolve: could not find `rayon` in `{{root}}`
 --> /home/ralith/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.9.3/src/dispatch/dispatcher.rs:7:56
  |
7 | pub type ThreadPoolWrapper = Option<::std::sync::Arc<::rayon::ThreadPool>>;
  |                                                        ^^^^^ could not find `rayon` in `{{root}}`

error[E0609]: no field `thread_pool` on type `dispatch::builder::DispatcherBuilder<'a, 'b>`
   --> /home/ralith/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.9.3/src/dispatch/builder.rs:238:28
    |
238 |         dispatcher_builder.thread_pool = self.thread_pool.clone();
    |                            ^^^^^^^^^^^ help: a field with a similar name exists: `thread_local`

error[E0609]: no field `thread_pool` on type `&mut dispatch::builder::DispatcherBuilder<'a, 'b>`
   --> /home/ralith/.cargo/registry/src/github.com-1ecc6299db9ec823/shred-0.9.3/src/dispatch/builder.rs:238:47
    |
238 |         dispatcher_builder.thread_pool = self.thread_pool.clone();
    |                                               ^^^^^^^^^^^

Building without default features should be tested in CI.

azriel91 commented 4 years ago

Hiya, this is fixed by #163, released in 0.9.4.

edit: yes this should be caught by CI, I'll check the script later.

azriel91 commented 4 years ago

https://github.com/amethyst/shred/pull/170 should catch building without the "parallel" feature, as it includes:

cargo test --verbose --no-default-features --features "shred-derive"