Restore symlinks in .npm-workspaces after the build completes.
Review Request #14984 — Created March 31, 2026 and submitted
When performing a build with NPM enabled and Python-based NPM modules
set, symlinks in.npm-workspaceswould get set to the location within
the newly-installed module. That would become a dangling symlink, since
that module was installed in the isolated build environment, and if
there was an existing symlink pointing to a dev tree, it would be lost.Now, any symlinks in
.npm-workspacesthat will be overridden will be
restored after a build, whether it completes successfully or errors out.
This should help to avoid confusing runtime and build issues after a new
build.
Tested a build with Review Board and watched the symlinks in the directory.
Verified that the symlinks were changed during the build and restored
after.
| Summary | ID |
|---|---|
| 86ba91a7ba4aafcc704c8d55d4f62f2bdc499883 |
| Description | From | Last Updated |
|---|---|---|
|
Instead of a global, how about if we return the dict from _rebuild_npm_workspaces? |
|
- Change Summary:
-
Updated to return the mapping instead of using a global, and re-tested.
- Commits:
-
Summary ID e64e5221555b635df444d818687b760467ad89af 86ba91a7ba4aafcc704c8d55d4f62f2bdc499883 - Diff:
-
Revision 2 (+96 -16)