-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
bug: Repeated builds will result in incorrect cache #3363
Comments
@brc-dd There is no fix. The above error can still be reproduced after upgrading to the latest version 1.0.0-rc.34 |
Looks like that markdown cache is not causing this. Some other step is caching stuff. |
This is reopened because the related PR is reverted. It didn't actually fix the issue and caused other issues. Based on the discussions on nodejs/help#1399, I think the only feasible way is to use a separate worker thread for this. Adding queries to imports to bust cache has memory leaks and it doesn't modify the nested modules which in turn results in re-execution of modules. This is problematic for modules such as the app entrypoint as they have side-effects like symbol initializations that change when something is run twice. |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [vitepress](https://vitepress.dev/) ([source](https://github.com/vuejs/vitepress)) | devDependencies | minor | [`1.3.4` -> `1.4.1`](https://renovatebot.com/diffs/npm/vitepress/1.3.4/1.4.1) | --- ### Release Notes <details> <summary>vuejs/vitepress (vitepress)</summary> ### [`v1.4.1`](https://github.com/vuejs/vitepress/blob/HEAD/CHANGELOG.md#141-2024-10-13) [Compare Source](vuejs/vitepress@v1.4.0...v1.4.1) ##### Bug Fixes - broken rewrites on windows ([#​4268](vuejs/vitepress#4268)) ([b46d6d3](vuejs/vitepress@b46d6d3)) - **client:** use `usePreferredDark` with `appearance: "force-auto"` ([#​4263](vuejs/vitepress#4263)) ([3e8fc40](vuejs/vitepress@3e8fc40)) - **client:** wrong script async check ([461a5b0](vuejs/vitepress@461a5b0)) - **theme:** bind missing no icon prop in the menu link component [#​4260](vuejs/vitepress#4260) ([b96712c](vuejs/vitepress@b96712c)) - **theme:** improve local search input a11y ([#​4066](vuejs/vitepress#4066)) ([92b92ae](vuejs/vitepress@92b92ae)) ##### Features - **experimental:** support passing function for rewrites ([#​4274](vuejs/vitepress#4274)) ([8436472](vuejs/vitepress@8436472)) ### [`v1.4.0`](https://github.com/vuejs/vitepress/blob/HEAD/CHANGELOG.md#140-2024-10-07) [Compare Source](vuejs/vitepress@v1.3.4...v1.4.0) ##### Bug Fixes - `vueRE` conflicting with `lineNoRE` ([#​4247](vuejs/vitepress#4247)) ([2ac64b8](vuejs/vitepress@2ac64b8)) - hmr not updating page data in rewritten paths and file path is wrong in mdit for dynamic routes ([c46e4b7](vuejs/vitepress@c46e4b7)), closes [#​4172](vuejs/vitepress#4172) - remove font synthesis in webfont mode, google fonts now support italic axis in inter ([1628918](vuejs/vitepress@1628918)) - **theme:** change the order of CSS rules of `VPFlyout` ([#​4225](vuejs/vitepress#4225)) ([68150a6](vuejs/vitepress@68150a6)), closes [#​4224](vuejs/vitepress#4224) - **theme:** respect custom tag prop in VPButton component ([#​4185](vuejs/vitepress#4185)) ([9c5d348](vuejs/vitepress@9c5d348)) ##### Features - add `data-title` attribute for code group label tag ([#​4152](vuejs/vitepress#4152)) ([bc7271d](vuejs/vitepress@bc7271d)) - allow ignoring certain headers and their subtrees completely in outline ([3e11b6a](vuejs/vitepress@3e11b6a)), closes [#​4171](vuejs/vitepress#4171) - **client:** add `onAfterPageLoad` hook in router ([#​4126](vuejs/vitepress#4126)) ([315c220](vuejs/vitepress@315c220)) - support adding extra attributes to snippet imports (useful for twoslash) ([#​4100](vuejs/vitepress#4100)) ([e8f7dd1](vuejs/vitepress@e8f7dd1)) - **theme:** expose theme default VPLink & VPSocialLink(s) component ([#​4178](vuejs/vitepress#4178)) ([615e33b](vuejs/vitepress@615e33b)) - trigger `onContentUpdated` on frontmatter-only changes too ([0db269a](vuejs/vitepress@0db269a)) #### [1.3.4](vuejs/vitepress@v1.3.3...v1.3.4) (2024-08-24) ##### Bug Fixes - check if `_importGlobMap` (vite internal) exists before using it ([612d66f](vuejs/vitepress@612d66f)) #### [1.3.3](vuejs/vitepress@v1.3.2...v1.3.3) (2024-08-17) ##### Miscellaneous - bump deps ([a20db24](vuejs/vitepress@a20db24)) #### [1.3.2](vuejs/vitepress@v1.3.1...v1.3.2) (2024-08-05) ##### Bug Fixes - multiple cache busting imports causing useData to fail ([2b3e486](vuejs/vitepress@2b3e486)), closes [#​3820](vuejs/vitepress#3820), reverts [#​3398](vuejs/vitepress#3398), reopens [#​3363](vuejs/vitepress#3363) - **theme:** excerpt style in LocalSearchBox ([#​4050](vuejs/vitepress#4050)) ([2bc0d39](vuejs/vitepress@2bc0d39)) #### [1.3.1](vuejs/vitepress@v1.3.0...v1.3.1) (2024-07-14) ##### Bug Fixes - don't reopen browser on restart when `vite.server.open` is specified ([6263db1](vuejs/vitepress@6263db1)), closes [#​4040](vuejs/vitepress#4040) - **theme/regression:** typo in component props resulting in nested titles not showing in navbar ([01d0d45](vuejs/vitepress@01d0d45)), closes [#​4042](vuejs/vitepress#4042) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInJlbm92YXRlIl19--> Reviewed-on: https://gitea.ocram85.com/arkanum/arkanum/pulls/130 Reviewed-by: OCram85 <marco.blessing@googlemail.com> Co-authored-by: renovate-bot <renovate@ocram85.com> Co-committed-by: renovate-bot <renovate@ocram85.com>
Describe the bug
I'm using vitepress's nodejs api, but one problem is that if I call build twice, the second time there will be the wrong cache, causing the built index.html to still be the old result from the first time.
Reproduction
git clone https://github.com/rxliuli/vitepress-error-demo
pnpm i
pnpm vitest
Expected behavior
The cache should be cleared during the second build
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: