-
Notifications
You must be signed in to change notification settings - Fork 218
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
Clean cache on every test run to make sure linked dependencies are up to date #7699
Conversation
It's not easily apparent how your changes you made resolves the issue. Can you add links to your PR description to the vitest config and explain how it works/ how it's fixed now |
From my experience, this configuration breaks debugging sometimes. Could you check to verify this change doesn't affect debugging. Thanks |
Curious about this, in what way does it break? I helped Bipin recreate the issue of tests failing because the vite cache was outdated, here is some details: If you add a new class and export it from a repo barrel file then use that class in another repo's tests, the compiler will be totally happy and rebuild just fine, but if you do not run rush install --purge the vite cache will not be updated. It can end up using an older version of the package from the vite cache without the class you added, so when tests are ran a syntax error will be thrown at run time as it cant find the class you added in the outdated cached package. |
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.
@anmolshres98 's issue with debugging is not related to the issue this PR is tackling. They were more pointing out how HMR/watch mode for vite doesn't watch for linked workspace deps in apps, like DTA and DPTA. I've created a separate issue for that, as an enhancement anyone can tackle, but it should not block this PR from going in, which we were able to reproduce the problem and verify the problem disappeared with this PR's change via @MichaelSwigerAtBentley
This pull request is now in conflicts. Could you fix it @pachhaibipin? 🙏 |
PR Description
Fixes:
optimizeDeps: { force: true, }
to vitest config so as to force dependency pre-bundling, ignoring previously cached optimized dependencies.