You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using bevy_asset_loader and dynamic asset loading (a .manifest file) on an example repository created from @NiklasEi's template here (https://github.com/NiklasEi/bevy_game_template). When the app is served to a browser using Trunk, and anything is created or modified in the assets directory, it causes Trunk's automatic reloading functionality to trigger over and over again.
Trunk uses v4 of the notify crate, which is build on top of the FSEvents API on Mac OS, so I used fsevents to print out the filesystem events when adding an empty file to the assets directory with touch assets/test:
...repeated ten or so times. From this, it seems that bevy_asset_loader is doing something to the assets folder during build that generates a filesystem event, which then triggers another build, and so on. Eventually the loop stops, after a varying amount of loops, my only explanation for which is that potentially the debouncing built into notify is breaking the loop.
Initially, I thought this may be related to notify-rs/notify#465 or watchexec/cargo-watch#242, but printing the filesystem events showed that the "AttributeModified" event is being triggered on the new file over and over again, which notify is probably correct to pick up.
My apologies if this issue belongs in another repository- unfortunately this appears to be a strange (potentially platform-specific) interaction between a number of dependencies so it is difficult to nail down.
This issue only occurs for me while using dynamic assets, however since opening this I have noticed related issues being discussed on the Trunk repository itself, which very well might resolve my issue: trunk-rs/trunk#461 trunk-rs/trunk#516
So I think I can resolve this in favor of that PR for now. I'll re-open if it turns out to be unrelated! Thank you for your time.
I am using bevy_asset_loader and dynamic asset loading (a .manifest file) on an example repository created from @NiklasEi's template here (https://github.com/NiklasEi/bevy_game_template). When the app is served to a browser using Trunk, and anything is created or modified in the
assets
directory, it causes Trunk's automatic reloading functionality to trigger over and over again.Trunk uses v4 of the
notify
crate, which is build on top of the FSEvents API on Mac OS, so I usedfsevents
to print out the filesystem events when adding an empty file to the assets directory withtouch assets/test
:...repeated ten or so times. From this, it seems that bevy_asset_loader is doing something to the assets folder during build that generates a filesystem event, which then triggers another build, and so on. Eventually the loop stops, after a varying amount of loops, my only explanation for which is that potentially the debouncing built into
notify
is breaking the loop.Initially, I thought this may be related to notify-rs/notify#465 or watchexec/cargo-watch#242, but printing the filesystem events showed that the "AttributeModified" event is being triggered on the new file over and over again, which
notify
is probably correct to pick up.My apologies if this issue belongs in another repository- unfortunately this appears to be a strange (potentially platform-specific) interaction between a number of dependencies so it is difficult to nail down.
Example repository: https://github.com/cxreiff/untitled
OS: macOS 13.2.1
CPU: (12) arm64 Apple M2 Max
The text was updated successfully, but these errors were encountered: