Conversation
771ed41 to
d274f34
Compare
Co-authored-by: Matthieu <[email protected]>
d274f34 to
57ac709
Compare
|
These changes change the behavior of the class and might breaks its uses (1). They also fails to address one of the issues linked to the restart in watch mode (2).
|
this is the goal. I am a bit confused do want debouncing or not?
Not sure why you want to avoid effecting current behavior? |
Because of other uses of this class, like here |
that is watch mode for |
|
|
||
| #onChange(trigger) { | ||
| if (this.#debouncing.has(trigger)) { | ||
| if (this.#debouncing.has(trigger) || this.#debouncing.has(kGlobalDebounce)) { |
There was a problem hiding this comment.
We always set the 2 of these together, can't we simplify by only setting & checking for the kGlobalDebounce? (and drop the .add(trigger) as well)
There was a problem hiding this comment.
Piggy backing on this comment to emphasis that indeed, with this implementation, the second part of the if will always be true if any other file already triggered as #onChange. This not only renders the use of the this.#debouncing set unnecessary (a simple boolean would suffice), but it also means that the owners argument of the event will no longer contain all the owners. Indeed, a change to file A would cause kGlobalDebounce to be set so that any change to file B would get ignored by this if condition.
right but that implementation depends on the |
|
Something like this might not break the current behaviour. main...matthieusieben:node:patch-4 (#51988) This would still cause too many restarts in case of |
|
Superseded by #51992 |
Fixes #51954