-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Haste map is sometimes missing dotfiles #10063
Comments
Cheers for a great bug report! I tested and adding |
Just bumped into this with |
I've noticed this sporadic behaviour too and I've seen reports of similar sporadic behaviour too in The code below would explain this behaviour I think. Depending on whether the clock is available, if const relativeRoot = fastPath.relative(rootDir, root);
const query = clocks.has(relativeRoot) // Use the `since` generator if we have a clock available
? {
expression,
fields,
since: clocks.get(relativeRoot)
} // Otherwise use the `glob` filter
: {
expression,
fields,
glob
};
const response = yield cmd('query', root, query); |
@vjpr is totally spot on! When a clock value is NOT present and, therefore, @grosto is there any chance you could include a fix for this as well please? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
At Airbnb we are using jest haste map directly in some of our projects. When toggling on the
useWatchman
option totrue
, we've noticed that it sometimes includes dotfiles (e.g..eslintrc.js
) and sometimes does not. Removing the haste map cache and runningwatchman watch-del-all
seems to resolve the problem. I've been able to reproduce this bug sometimes by restarting my machine and running the program again.I've read through some issues that seem to be somewhat relevant to this problemspace:
From that last issue on watchman, I suspect we maybe need to add
glob_includedotfiles
somewhere, maybe in this vicinity? https://github.com/facebook/jest/blob/9ffd368330a3aa05a7db9836be44891419b0b97d/packages/jest-haste-map/src/crawlers/watchman.ts#L98-L147Maybe here: https://github.com/facebook/jest/blob/9ffd368330a3aa05a7db9836be44891419b0b97d/packages/jest-haste-map/src/crawlers/watchman.ts#L129
To Reproduce
Steps to reproduce the behavior:
We are calling HasteMap like this:
Our directories contain a mix of files, and some are named
.eslintrc.js
.This could also be related to our ignorePattern setting here, but the caching seems suspect.
Expected behavior
The list of files should be consistent regardless of cache state.
envinfo
The text was updated successfully, but these errors were encountered: