Repository navigation
Conversation
WorkspaceFile::PnpmWorkspaceYaml now holds a PnpmWorkspaceFile, which keeps the file bytes with a parse result that is filled on first use. Member lookup, load_package_graph, and the new pm_on_fail() accessor share that one parse. A lookup from the workspace root still skips the parse, and each find_workspace_root call reads the file again. pm_on_fail() returns the raw pmOnFail string. A missing or non-string value reads as None, so it cannot break member lookup. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fspy benchmarklinuxmacoswindows |
fengmk2
marked this pull request as draft
December 6, 2026 08:32
fengmk2
marked this pull request as ready for review
December 6, 2026 08:35
Use once_cell's OnceCell::get_or_try_init for the lazy parse, as vt already does, so the parse lives in PnpmWorkspaceFile::parsed(). WorkspaceMemberGlobs owns its globs again, and the tests check the cache state directly in place of a test-only parse counter. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fengmk2
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Dec 6, 2026
Windows treats PNPM_CONFIG_PM_ON_FAIL and pnpm_config_pm_on_fail as one variable, so clearing the lowercase name after setting the uppercase one removed the policy. Also moves the vite-task pin to 2d01e63e, the current head of voidzero-dev/vite-task#1064.
Member
Author
|
Benchmark of
The saving matches one parse. With a 3-line |
This branch has not been deployed
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.
Motivation
Vite+ reads
pmOnFailfrompnpm-workspace.yamlto choose the pnpm version thatvp --versionreports (voidzero-dev/vite-plus#3697). For that, it parses the file again with its ownserde_norwaydependency.find_workspace_rootalready holds the file bytes, and a lookup from a member package has already parsed them for the member globs.load_package_graphthen parses the same file a third time.WorkspaceFile::PnpmWorkspaceYamlnow holds aPnpmWorkspaceFile, which keeps the file bytes with a parse result that is filled on first use (OnceCell). Member lookup,load_package_graph, and the newpm_on_fail()accessor share that one parse. A lookup from the workspace root still skips the parse, and eachfind_workspace_rootcall reads the file again, so it sees later edits.pm_on_fail()returns the raw string and leaves its meaning to the caller. A missing or non-string value reads asNone, so it cannot break member lookup.PnpmWorkspaceFilekeepscontent()andpath(), andFrom<FileWithPath>builds one, so callers that match the variant or read its bytes still compile.