Remove async-task as a dependency (#13071)
# Objective Follow up to #13062. As of async-executor 1.11, the crate reexports FallibleTask, which is the only reason bevy_tasks has a direct dependency on async-task. This should avoid the two dependencies getting out of sync in the future and causing spurious compilation failures. ## Solution Bump async-executor to 1.11, use the reexport, remove the dependency on async-task.
This commit is contained in:
		
							parent
							
								
									0f27500e46
								
							
						
					
					
						commit
						ddc9599d5e
					
				| @ -9,14 +9,13 @@ license = "MIT OR Apache-2.0" | |||||||
| keywords = ["bevy"] | keywords = ["bevy"] | ||||||
| 
 | 
 | ||||||
| [features] | [features] | ||||||
| multi-threaded = ["dep:async-channel", "dep:async-task", "dep:concurrent-queue"] | multi-threaded = ["dep:async-channel", "dep:concurrent-queue"] | ||||||
| 
 | 
 | ||||||
| [dependencies] | [dependencies] | ||||||
| futures-lite = "2.0.1" | futures-lite = "2.0.1" | ||||||
| async-executor = "1.7.2" | async-executor = "1.11" | ||||||
| async-channel = { version = "2.2.0", optional = true } | async-channel = { version = "2.2.0", optional = true } | ||||||
| async-io = { version = "2.0.0", optional = true } | async-io = { version = "2.0.0", optional = true } | ||||||
| async-task = { version = "4.7.0", optional = true } |  | ||||||
| concurrent-queue = { version = "2.0.0", optional = true } | concurrent-queue = { version = "2.0.0", optional = true } | ||||||
| 
 | 
 | ||||||
| [target.'cfg(target_arch = "wasm32")'.dependencies] | [target.'cfg(target_arch = "wasm32")'.dependencies] | ||||||
|  | |||||||
| @ -12,7 +12,6 @@ use std::{ | |||||||
| /// more gracefully and wait until it stops running, use the [`Task::cancel()`] method.
 | /// more gracefully and wait until it stops running, use the [`Task::cancel()`] method.
 | ||||||
| ///
 | ///
 | ||||||
| /// Tasks that panic get immediately canceled. Awaiting a canceled task also causes a panic.
 | /// Tasks that panic get immediately canceled. Awaiting a canceled task also causes a panic.
 | ||||||
| /// Wraps `async_executor::Task`
 |  | ||||||
| #[derive(Debug)] | #[derive(Debug)] | ||||||
| #[must_use = "Tasks are canceled when dropped, use `.detach()` to run them in the background."] | #[must_use = "Tasks are canceled when dropped, use `.detach()` to run them in the background."] | ||||||
| pub struct Task<T>(async_executor::Task<T>); | pub struct Task<T>(async_executor::Task<T>); | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ use std::{ | |||||||
|     thread::{self, JoinHandle}, |     thread::{self, JoinHandle}, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| use async_task::FallibleTask; | use async_executor::FallibleTask; | ||||||
| use concurrent_queue::ConcurrentQueue; | use concurrent_queue::ConcurrentQueue; | ||||||
| use futures_lite::FutureExt; | use futures_lite::FutureExt; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 James Liu
						James Liu