-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
embedded_watcher
does not work in multi-crate workspaces
#10575
Comments
As a temporary workaround I've been able to do: BEVY_ASSET_ROOT=`pwd` cargo run --package sub_crate From the workspace root. |
Testing this today, |
What fixed it? I'll retest when I find the time. |
Dunno, looking the blame, I don't see anything specifically addressing this issue, the relevant ones are: |
Nope, still doesn't seem to work for me on bevy 0.13. Or to be precise, |
Ooops, I'm re-opening then. |
It's possible that this only reproduces with virtual workspaces, where the outermost |
I ran into this today as I started moving some of my rendering plugins to their own crates and realized shader reloading stopped working. I can confirm that it only affects virtual workspaces, and I fixed it on my end by moving my app to be the root crate. Would be nice to not need to do this though, as down the line I would like to be able to do shader dev while working on examples and so on as well... |
Just to follow up on this, I can confirm this happens under the following circumstances:
The only workaround is to set It is unfortunately very unlikely that we will ever have |
Bevy version
0.12
What you did
Enable the
embedded_watcher
feature and useembedded_asset!
in a subcrate.What went wrong
The embedded watcher does not react to changes to the embedded file.
Additional information
This is caused by the file watcher watching only the "base path" for changes (by default, this is the runtime value of
CARGO_MANIFEST_DIR
, which is the path containing theCargo.toml
of the final binary):bevy/crates/bevy_asset/src/io/embedded/embedded_watcher.rs
Lines 32 to 40 in 675aac9
It should either be watching every single embedded file path separately, or merge them together by crate (though watching many separate paths may be bad for performance).
The text was updated successfully, but these errors were encountered: