-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
fix for handling braces in path #622
Conversation
Looks like it's causing a few tests to consistently fail. Did you try a split-string based approach as suggested in #614? |
I took braces because of discussion in #287, I honestly did not test it on Linux, since my main windows, will try to fix tests asap. |
1 similar comment
closing since i dont have macos so finding the problem causing the test fall would take some time for sure |
https://travis-ci.org/paulmillr/chokidar/jobs/260414604 this one looks really weird because in last build it was failing on braces test and i changed only braces test, @es128 can you maybe restard this particular job please, if you have access, will much appretiate it. |
@MhMadHamster thanks this is really good work. I got the one job in Travis passing after a few retries - this isn't unusual, the CI envs are fickle, especially for OS X. There is one last problem to solve - the "check ignore after stating" test is failing on Windows with this patch. |
@es128 tbh this test is failing for me even on the current release of chokidar, using windows 10 node 6.9.1 npm 3.10.8 😕 will look into that issue. |
@MhMadHamster oh yeah? It wasn't failing on appveyor before this patch. I'm not sure what the issue is. Sporadic failures are just noise, but when the same test fails on every version in both modes it's indicative of something needing to be adjusted. |
@es128 yeah, I remember that it wasn't failing before, at least in my environment. |
Thanks for checking into it! ❤️ |
Well, I tracked problem down to anymatch, tho I'm not sure what's the better way to resolve it, the problem with windows is: in the failing test we have variable testDir which is getting compared in ignore function to the path of watched dirs/files, the testDir itself is created using default nodejs path module, so the path inside using backslashes, tho when the function in ignored, getting called by anymatch, it's been called 2 times once with path "as is" and once with normalized path and I'm not sure what was idea behind that, therefore when we're calling the first time with value "as is", we're correctly getting false, but the second time we're calling with normalized path i.e. with forward slashes and getting true when we're expecting false. I don't have an idea how could possibly this test pass on windows before. |
So if you use The path doesn't exactly change deliberately between ignore checks, it's just that the first time it's based on user input and the second time it's based on |
Although we do have to question why it worked before and why this patch had an impact. |
yes both for path passed in function and testDir
In fact this patch do not have impact on this test, i believe breaking changes can be found here, since then check for normalized path was added. |
ooook I see, thanks for clarifying. Sorry for putting you through all this, and thank you for your diligence. Let's just update the test to use the normalized path and land this PR. |
@es128 can you restart failing jobs please, thanks. |
No description provided.