Skip to content
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

test: don't share cacheDir among different configs #12625

Merged
merged 1 commit into from Mar 28, 2023

Conversation

sapphi-red
Copy link
Member

Description

The test was sometimes failing with dep optimizer related errors. I guess this is caused by sharing cacheDir among different configs since we run tests with different configs parallelly.

Maybe we can include the config file path in cacheDir automatically in Vite 5?

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@stackblitz
Copy link

stackblitz bot commented Mar 28, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Mar 28, 2023
@bluwy
Copy link
Member

bluwy commented Mar 28, 2023

Maybe we can include the config file path in cacheDir automatically in Vite 5?

There would still be an issue when calling Vite through the API though, maybe the optimizer metadata hash could be used to key it 🤔 (Actually that makes invalidation hard too.)

@patak-dev
Copy link
Member

As a rule, you can't run two Vite processes with the same cache dir at the same time. And the cache dir can be also changed when using the JS API, no?
We may be seeing more issues because we changed the delete-rename scheme for dep optimization in main, #12622 could hide these issues again.

@patak-dev patak-dev merged commit 8288ce6 into vitejs:main Mar 28, 2023
11 checks passed
@sapphi-red sapphi-red deleted the test/dont-share-cache-dir branch March 28, 2023 08:59
@sapphi-red
Copy link
Member Author

Umm, that's a good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants