onlydustxyz / starklings

An interactive tutorial to get you up and running with Starknet
309 stars 83 forks source link

watcher: simplify events handling #120

Closed BoboTiG closed 2 years ago

BoboTiG commented 2 years ago

Is there any specific reason to prefer the catch-them-all on_any_event() over the more specialized on_modified()?

Bernardstanislas commented 2 years ago

@BoboTiG no reason at all, thank you for pointing this out :)

Bernardstanislas commented 2 years ago

@BoboTiG I tried to run the CLI with this minor change and surprisingly, I get 3 callback calls upon a file change – multiple changes can be chained due to my editor auto-format. Increasing the debounce delay did not make it work either, have you had the same issue on your side?

Bernardstanislas commented 2 years ago

@BoboTiG I tried to run the CLI with this minor change and surprisingly, I get 3 callback calls upon a file change – multiple changes can be chained due to my editor auto-format. Increasing the debounce delay did not make it work either, have you had the same issue on your side?

@BoboTiG nevermind it also happens on main, sorry for the remark

BoboTiG commented 2 years ago

@BoboTiG I tried to run the CLI with this minor change and surprisingly, I get 3 callback calls upon a file change – multiple changes can be chained due to my editor auto-format. Increasing the debounce delay did not make it work either, have you had the same issue on your side?

Yeah, it all depends on how the editor save files + metadata updates.