Reduce duplicate dependency storage across worktrees#3325
Open
nighca wants to merge 9 commits into
Open
Conversation
nighca
commented
Jul 8, 2026
| arrowStyle: Ref<CSSProperties | null> | ||
| } | ||
|
|
||
| export function useFloatingPopup(options: UseFloatingPopupOptions): UseFloatingPopupReturn { |
Collaborator
Author
There was a problem hiding this comment.
给 function 添加显式的对返回类型的标注,因为 pnpm 默认的依赖(在 node_modules/ 中的)组织方式影响了 TS 的行为,这里虽然能推断出类型,但是会有 TS2742 的问题:
The inferred type of 'xxx' cannot be named without a reference to ...
This is likely not portable. A type annotation is necessary.
spx-gui/src/utils/utils.ts 中的改动是相同的原因
| import spxPackage from '@xgo-pkgs/spx/package.json' | ||
|
|
||
| const ispxWasmUrl = new URL('@/assets/wasm/ispx.wasm', import.meta.url).href | ||
| // TODO: Importing runner.html as a Vite asset would give us a hashed immutable |
Collaborator
Author
There was a problem hiding this comment.
后面这个 TODO 如果解决了,link-spx.sh 就也可以干掉了
Collaborator
Author
There was a problem hiding this comment.
最新的与 UI 约定的工作流是基于真实代码实现 prototype 而不是维护单独的 ui 分支或目录,所以 ui/prototype/ 目录现在没用了,留着的话还要做 pnpm 的迁移,所以顺便干掉了
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3234
Summary
@xgo-pkgs/spxnpm package and expose them through a versionedpublic/spx_<version>symlink duringpostinstall@xgo-pkgs/spx/package.jsoninstead of maintainingVITE_SPX_VERSIONui/prototypepackage and add explicit pnpm dependencies/types needed under strict dependency resolutionHow This Reduces Duplicate Storage
node_modules/.@xgo-pkgs/spx, so the large SPX runner files also participate in pnpm's shared store instead of being downloaded and unpacked separately per worktree.node_modules/andpublic/spx_<version>to the shared package content, while the versioned public path keeps the existing cache-invalidation behavior for deployed runner assets.Validation
corepack pnpm@11.9.0 install --frozen-lockfileinspx-guicorepack pnpm@11.9.0 install --frozen-lockfileintutorialbash link-spx.shinspx-guicorepack pnpm@11.9.0 run type-checkinspx-guicorepack pnpm@11.9.0 run lintinspx-guicorepack pnpm@11.9.0 run format-checkinspx-guicorepack pnpm@11.9.0 run test -- --runinspx-guibash build-wasm.shinspx-guicorepack pnpm@11.9.0 run buildinspx-guicorepack pnpm@11.9.0 run build:accountinspx-guibash vercel-build.shinspx-guiafter deletingpublic/spx_2.0.4anddist, verifyingdist/spx_2.0.4/runner.htmlcontains the SPX runner@xgo-pkgs/spx@2.0.5-0.20260708083310-ffe456ac46fd, then reverted the temporary version bumpgit diff --check