bevy/crates/bevy_asset/src
Nicola Papale 96444b24fd
Fix file_watcher feature hanging indefinitely (#10585)
# Objective

Fix the `bevy_asset/file_watcher` feature in practice depending on
multithreading, while not informing the user of it.

**As I understand it** (I didn't check it), the file watcher feature
depends on spawning a concurrent thread to receive file update events
from the `notify-debouncer-full` crate. But if multithreading is
disabled, that thread will never have time to read the events and
consume them.

- Fixes #10573 


## Solution

Add a `compile_error!` causing compilation failure if `file_watcher` is
enabled while `multi-threaded` is disabled.

This is considered better than adding a dependency on `multi-threaded`
on the `file_watcher`, as (according to @mockersf) toggling on/off
`multi-threaded` has a non-zero chance of changing behavior. And we
shouldn't implicitly change behavior. A compilation failure prevents
compilation of code that is invalid, while informing the user of the
steps needed to fix it.
2023-11-20 09:43:43 +00:00
..
io Do not panic when failing to create assets folder (#10613) (#10614) 2023-11-17 22:06:08 +00:00
processor Make AssetLoader/Saver Error type bounds compatible with anyhow::Error (#10493) 2023-11-14 01:25:06 +00:00
server Add missing asset load error logs for load_folder and load_untyped (#10578) 2023-11-16 21:31:20 +00:00
assets.rs Non-blocking load_untyped using a wrapper asset (#10198) 2023-10-26 22:14:32 +00:00
event.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
folder.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
handle.rs Asset v2: Asset path serialization fix (#9756) 2023-09-13 05:43:01 +00:00
id.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
lib.rs Fix file_watcher feature hanging indefinitely (#10585) 2023-11-20 09:43:43 +00:00
loader.rs Added Method to Allow Pipelined Asset Loading (#10565) 2023-11-16 17:47:31 +00:00
meta.rs assets: use blake3 instead of md5 (#10208) 2023-10-23 04:15:04 +00:00
path.rs Don't .unwrap() in AssetPath::try_parse (#10452) 2023-11-09 18:07:48 +00:00
reflect.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
saver.rs Make AssetLoader/Saver Error type bounds compatible with anyhow::Error (#10493) 2023-11-14 01:25:06 +00:00