-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Update is-glob dep to ^3.0.0 #535
Conversation
Looks like this is causing some failures in glob-related tests on Appveyor (Windows) consistently that were not there before. These will have to be investigated and resolved before this is merged. |
FYI @jonschlinkert |
looking now edit: I'll have to pull this down to see what's causing the issues. it's not obvious from appveyor what's happening. |
Friendly ping since many people have issues with this :). |
what specifically are many people having issues with? Nothing has been merged, and afaik no actual issues were ever created for the prior version of is-glob, only speculation. (edited, I said edit 2: sorry I see you are probably referring to all of the linked issues. I'll review |
@jonschlinkert it's a long-standing issue in chokidar that when given a path to watch that matches the original is-glob regex it would treat it as a glob instead of as an actual file path and not work properly in some cases. The updated is-glob would solve that for parenthesis characters at least, but other things like I have not yet been able to take any time to try to figure out what's going on with these tests on windows. |
Ok, thanks for the summary.
Regarding this, I'm wondering if the tests are actually "correct" now. fwiw I'm getting a windows box this week to make testing this stuff easier. |
The three tests have nothing to do with parentheses, and it's not at all obvious why they started failing. But they failed in both polling and non-polling modes with each node version, so it seems pretty clear that something happened that merits investigation. It's not necessarily that is-glob has a bug or is doing anything wrong, just need to figure out what's up. The fact that it presents only on windows does make it more challenging to work on. https://github.com/paulmillr/chokidar/blob/master/test.js#L534 |
Hmm, yeah that is strange. @doowb and I are both working on this right now. Sorry I was on vacation part of last week - there is no easy way to let everyone know that on github. |
edit: I should clarify that (I believe) this is mostly a problem with how test fixtures are defined. I'm not sure if this carries over into the code anywhere. Ok, @doowb and I have narrowed down the main cause of the "windows" issues. It's not technically related to is-glob, but it's manifesting now since previous versions of is-glob did not respect escaping. The gist of it is that paths with Backslashes are invalid path separators in glob patterns (in all of the globbing libs, node-glob, minimatch, micromatch, etc), so we're getting the correct, expected result from is-glob. If we somehow change the patterns passed by the user, we need to make sure that our paths don't have backslashes, or that at least the very last slash between the new path and the glob pattern is not a backslash. Otherwise, we're just potentially escaping a valid glob character. Does this make sense? fwiw normally users aren't slapped on the wrist for defining patterns with |
@jonschlinkert @doowb thank you for uncovering the likely cause. It makes sense. However, I don't think resolution is totally straightforward. The tests don't specify any backslashes, they simply use If the string is actually coming through with If the string actually does look more like |
If your suggestion was that chokidar runs a |
I think we can.
I'd like to find a nice solution for everyone. There at least three open issues on node-glob and minimatch related to exactly this problem (escaping and windows backslashes conflicting). I'll try to link to them when I have a chance. I'm going to think about this and come back to it before I make any suggestions. |
I updated is-glob dependecy to 3.1.0 manually on chokidar and the problem still happens. I'm trying to watch the folder inside "Program Files (x86)". What I have to do? |
@es128 |
@xsq007 no. The issue hasn't been resolved yet and it would break chokidar for windows users. |
@es128 |
This is probably bypassable now using the new |
No, not taking |
@es128 the only solution I can think of that seems like a decent compromise is to expose an option to let users choose escaping behavior. but I don't know if that's a good way to solve this. It seems like users will (understandably) get confused or create issues on both sides of the solution, no matter how intuitive or whatever options we expose. just thinking out loud. |
Resolves #533