Closed cakekindel closed 5 months ago
is micromatch not cross-platform? :anger:
I am very confused as well - I went through the code and all the paths seem to be handled properly, so I am not sure why the failures
I'd imagine it's because there's an assumption that foo/**
will match both foo and foo/a
, which i'm guessing doesn't hold on windows :confused:
Description of the change
fixes #1231
Before, we were eagerly turning string glob patterns to matching functions
String -> Boolean
, and adding new patterns with||
. The instance(HeytingAlgebra b) => HeytingAlgebra (a -> b)
isn't stack safe, causing sufficiently large gitignore files to overflow the call stack.Now, we accumulate the patterns themselves and build them into micromatch patterns when we evaluate them. The actual call to
micromatch
costs practically nothing, so this flat-out wins time & space cost (as well as fixing the stack-safety issue)Turns out we've learned which option is more performant :sweat_smile:
Checklist:
README
P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated đ