fix(env): regenerate all trampoline .exe files after upgrade#1369
Merged
fix(env): regenerate all trampoline .exe files after upgrade#1369
.exe files after upgrade#1369Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
e8dbb3f to
fd7e589
Compare
This comment was marked as resolved.
This comment was marked as resolved.
fd7e589 to
79d4856
Compare
fengmk2
commented
Apr 13, 2026
fengmk2
commented
Apr 13, 2026
79d4856 to
2d37595
Compare
Member
Author
|
@cursor review |
2d37595 to
11be4e3
Compare
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2d37595. Configure here.
fengmk2
commented
Apr 13, 2026
This comment was marked as resolved.
This comment was marked as resolved.
.exe files after upgrade
cpojer
approved these changes
Apr 13, 2026
During `vp upgrade`, only core shims (vp, node, npm, npx, vpx, vpr) were refreshed. Package shims installed via `vp install -g` (e.g., corepack.exe, tsc.exe) kept stale trampoline binaries from the previous version. - Add `BinConfig::find_all_vp_source()` to discover package shims - Add `refresh_package_shims()` to `vp env setup --refresh` (Windows) - Fix `create_package_shim()` to re-copy trampoline on re-install instead of returning early when .exe exists - Make `rename_to_old` pub(crate) for reuse in global_install Closes #1349
Address PR review: explicitly check for NotFound when trying to delete an .exe file, returning early instead of falling through to the rename_to_old fallback. Closes #1349
- Remove redundant try_exists check before remove_or_rename_to_old since it already handles NotFound - Log the original remove_file error at debug level before falling back to rename
07db9ed to
a5fca7d
Compare
Member
Author
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.


During
vp upgrade, only core shims (vp, node, npm, npx, vpx, vpr)were refreshed. Package shims installed via
vp install -g(e.g.,corepack.exe, tsc.exe) kept stale trampoline binaries from the
previous version.
BinConfig::find_all_vp_source()to discover package shimsrefresh_package_shims()tovp env setup --refresh(Windows)create_package_shim()to re-copy trampoline on re-installinstead of returning early when .exe exists
rename_to_oldpub(crate) for reuse in global_installCloses #1349
Note
Medium Risk
Changes Windows shim generation/refresh and global package shim overwrite behavior, which can affect command resolution and upgrade stability. Scoped to Windows and mostly best-effort, but failures could leave incorrect or stale shims.
Overview
Ensures Windows upgrades regenerate all trampoline shims, not just core tools:
vp env setup --refreshnow discovers package-installed binaries viaBinConfig(source: Vp) and replaces their<bin>.exewith the current trampoline.Updates global package install to always re-copy (or rename/delete then copy) the trampoline
.exeon re-install instead of skipping when the shim already exists, and adds a sharedremove_or_rename_to_oldhelper to handle locked executables. Also centralizesSHIM_TOOLSinsetupand documents the new upgrade refresh behavior in the RFCs.Reviewed by Cursor Bugbot for commit 2d37595. Configure here.