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
Also, if this is implemented, we need to think about deprecation. Do we remove the old flag entirely? this would break many existing scripts. Do we instead keep the old flag and simply add a new one? Imo the best option.
And how do we handle the short flag -d?
Good call, yes this should probably migrate over to --debounce: duration.
For the deprecation, as we are pre-stable, we can remove the old flag after some deprecation period.
The procedure would be to add the new --debounce flag, and emit a deprecation warning when using the old variant, with the warning that it will be removed in an upcoming release. After that flag deprecation warning was active for a bit (for something like this we tend to only go for a one release deprecation period) we can remove it entirely. In the interim there should probably also be an error when you try to use both or a clarification which takes precedent.
@lucascherzer It should be okay switch -d to mean --debounce right after --debounce-ms is removed, since code that hasn't been updated will throw a type error and not act in unexpected ways 👍
Activity
sholderbach commentedon Jul 16, 2025
Good call, yes this should probably migrate over to
--debounce: duration.For the deprecation, as we are pre-stable, we can remove the old flag after some deprecation period.
The procedure would be to add the new
--debounceflag, and emit a deprecation warning when using the old variant, with the warning that it will be removed in an upcoming release. After that flag deprecation warning was active for a bit (for something like this we tend to only go for a one release deprecation period) we can remove it entirely. In the interim there should probably also be an error when you try to use both or a clarification which takes precedent.lucascherzer commentedon Jul 16, 2025
Great. How do you think we best go about the
-pflag?Have it be bound to
--debounce-msduring the deprecation period and then switch to--debounce?Bahex commentedon Jul 16, 2025
@lucascherzer It should be okay switch
-dto mean--debounceright after--debounce-msis removed, since code that hasn't been updated will throw a type error and not act in unexpected ways 👍lucascherzer commentedon Jul 16, 2025
I will have a go at this once I'm off work
feat(watch): implement --debounce flag with duration (nushell#16187)