Skip to content

Conversation

CyberDex
Copy link
Member

fixes #159

Spine can do multiple manipulations with exported files, like:

  • delete
  • add
  • update

watcher should only consider the latest change

@CyberDex CyberDex changed the title fix-159 AssetWatcher throws an error when spine is exporting files fix: AssetWatcher throws an error when spine is exporting files Oct 14, 2025
@CyberDex
Copy link
Member Author

@Zyie please review

@Zyie Zyie self-requested a review October 14, 2025 20:05
Improves the asset watcher's stability and event handling by debouncing and deduplicating rapid file system events.

Adds logic to prevent redundant processing of 'add', 'change', and 'unlink' events when multiple changes occur for the same file in quick succession. This ensures that the watcher only processes the most relevant and final event, resolving issues that arise from rapid file modifications, such as during asset exports.

Fixes pixijs#159
@Zyie
Copy link
Member

Zyie commented Oct 15, 2025

hey @CyberDex I made a slight change to this PR that still hopefully fixes your issue

the concept is still the same but we now ensure all cases are handle rather than just a "change" event

let me know if this change works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AssetWatcher throws an error when spine is exporting files

2 participants