-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add unit tests for file ignore function in api-server watcher #3342
Comments
This appears to be vaguely related to Windows, remember my caveats ;) |
Lulz. But the unit test is, well, just a unit test! If not, @simoncrypta what do you think about taking a stab at this one? |
Let's go ! 👍 |
Let me know if you need any help @simoncrypta! |
I try to dig into why this odd behaved happens. First thing we should be aware is when we talk about windows, it can be different shell and environment.
We can say that Command Prompt and PowerShell are pretty similar for our use case. PowerShell add many powerful features and is much more up to date, for this reason I think we should only support PowerShell in case we need these extra features. Git Bash, it's package that contains bash with some Unix utilities. It's also use Finally, WSL (Windows Subsystem Linux) is more like a virtual machine of Linux with some nice performance and DX optimization. So we should refer WSL as a Linux environment. So in parallel with #3685, should we make test for all these options, 2 or only one. If we focus only on WSL, we can skip all the thing about windows specific. If we add PowerShell support, we can skip edge cases of using batch on Windows and focus on Windows native environment.
Just to be sure, we talk about which function? @dac09 |
I think I was originally referring to these lines here: https://github.com/redwoodjs/redwood/blob/main/packages/api-server/src/watch.ts#L85-L89 And this ignored function: https://github.com/redwoodjs/redwood/blob/main/packages/api-server/src/watch.ts#L95-L111 |
I'm trying to recall the issue.... if it remember correctly - on windows the dist files were being watched. I fixed this problem here: So I believe what I was suggesting in this (poorly written) issue was: |
Ah! This is what I understand, but I was about to ask exactly that 😆 Thanks for your help ! |
Related to #3338
In https://github.com/redwoodjs/redwood/blob/main/packages/api-server/src/watch.ts#L61-L66 - the ignored function has lead to some issues on Windows (see linked issue).
It seems odd that chokidar sends a unix-style path even on windows, and just to make sure we don't run into odd situations, we should:
The text was updated successfully, but these errors were encountered: