-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--watch behaves strangely #24213
Comments
When specifying You can pass additional files or folder to
Finally, you can exclude files from being watched, by specifying a
The behaviour where non existant paths are not an error is expected and desired - we want to allow you to watch a directory or folder that does not exist yet, that may only be created by the script itself during execution. |
You're right the default is specified. I'd phrase it differently though since it's a little unusual to have an option with an argument also have a global effect. The use of commas isn't documented as far as I can tell though, and neither is the pattern format referred to. Maybe it could be rewritten like this:
I still don't know what file patterns are supported. It doesn't seem be be shell-style globs (e.g. *.perl). |
Sorry to revisit this but globs would be convenient, are they supported somehow? If so I'll write a doc patch if you can give me a quick answer :) |
Version: Deno 1.44.2
I have two files
deno_tsx_test.tsx
andworker.perl
. I like the restarted so thought I'd try to use it when worker.perl changes as well but the behavior is pretty strange:with:
I get the expected behavior (no reloading).
with:
I get a reload when either worker.perl or deno_tsx_test.tsx change (why does explicitly mentioning worker.perl trigger reloading on
deno_tsx_test.tsx
?).with:
or
I don't get any errors or warning but reloading only happens on
deno_tsx_test.tsx
(so it seems that the presence of --watch triggers reloading on the run script regardless of the option value, and I've guessed badly on the argument value for the--watch
option).If --watch takes an argument it shouldn't magically affect watching of the script file itself, and if it gets a pattern or argument string it doesn't understand (and I think if their are not existing matching files) it should error. And the details of the option argument should be documented, and it's name changed to reflect the fact that it can be a pattern. And I think multiples --watch options should be allowed also.
The text was updated successfully, but these errors were encountered: