-
-
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
Support for --preserve-symlinks #7364
Conversation
Would be cool to add e2e test for that :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs and changelog entry.
Could you include some info in the OP about what concretely is missing?
resetCache: options.resetCache, | ||
retainAllFiles: options.retainAllFiles, | ||
rootDir: options.rootDir, | ||
roots: Array.from(new Set(options.roots)), | ||
throwOnModuleCollision: !!options.throwOnModuleCollision, | ||
useWatchman: options.useWatchman == null ? true : options.useWatchman, | ||
// Watchman can not handle symlinks: https://github.com/facebook/watchman/issues/105 | ||
useWatchman: options.preserveSymlinks == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should throw a hard error somewhere if both Watchman and preserve symlink options are provided
@@ -54,6 +54,8 @@ const projectCaches: WeakMap<ProjectConfig, ProjectCache> = new WeakMap(); | |||
// To reset the cache for specific changesets (rather than package version). | |||
const CACHE_VERSION = '1'; | |||
|
|||
const preserveSymlinks = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? Should probably have a todo
above it or something :)
…s/jest#7364) htbkoo/hey-hkul-hours-native-ns-vue
Just as an update, internally we managed to work around the missing symlinks by using: https://jestjs.io/docs/en/cli#runtestsbypath which works well enough with bazel as an underlying build/test system. Edit: We actually started running into issues, it does bypass the issue of jest not finding the tests but it still seems to be trying to dereference files in various places causing some unexpected behaviour. |
Any update on this? |
Any plans on getting this merged? Really need it |
Hi @SimenB could you please merge this. This is so annoying and makes using symlinks alongside jest very difficult. |
I'm very sorry about the slow response here - this touches a part of the code base I'm not really familiar with, and has huge potential perf consequences if done wrong. That said, I'm happy to merge this when e2e tests are added. This now has a horrible conflict, and I apologize for that as well. It's mostly due to the code now being written in TypeScript. Could you rebase/merge master and add a test? |
FWIW, I've been using this patch against jest 24.7.1, and I haven't noticed any issues. (I don't use watchman.) |
This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This PR was closed because it has been stalled for 30 days with no activity. Please open a new PR if the issue is still relevant, linking to this one. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This is my attempt to fix #5356 - I have been making very slow progress over the past months on this so I thought I would just open this PR to increase visibility and maybe someone else is inclined to help finish this up quicker.
For motivation see the discussion at #5356
Whit is still missing:
Test plan
Still need to add tests but the test plan would be the follwoing:
ln -s ../sum.test.js ./sum.test.js
)