rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] Expected that the rush update-autoinstaller command can sync the rush-plugins manifest.json files to the rush-plugins directory

Open LPegasus opened this issue 1 month ago • 2 comments

Summary

Currently, after running rush update-autoinstallers, the rush-plugin-manifest.json file is not copied to rush-plugins directory. Instead, it requires running rush update to trigger the sync of this file. This is somewhat counterintuitive in terms of usage.

Meanwhile, during development, it can also easily lead to the omission of the rush-plugin-manifest.json file. The development process is as follows:

  1. Develop the plugin locally and declare it in autoinstallers/rush-plugins/package.json using link:./<path_to>/my-rush-plugin.
  2. After testing is completed, the my-rush-plugin/rush-plugin-manifest.json file has already been saved in the git repository.
  3. Assuming that the rush-plugin-manifest.json file is not declared in the files field of my-rush-plugin's package.json, it is difficult for CI to detect this issue at this point. This is because CI usually runs the install command, and only rush update can identify this problem.

If rush update-autoinstaller tried to copy the manifest files, than in the update pnpm-lock.yaml step, the problem will be detected.

Repro steps

Run rush update-autoinstaller --name rush-plugins

Expected result: The rush-plugin-manifest.json files will be copied to the rush-plugins directory.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.155.1
rushVersion from rush.json? 5.155.1
useWorkspaces from rush.json? Yes
Operating system? Mac
Would you consider contributing a PR? Yes
Node.js version (node -v)? 22.20.0

LPegasus avatar Nov 25 '25 07:11 LPegasus

Currently the design is that rush update is the event that manages rush plugins. Rush plugins can be distributed across multiple autoinstallers, so we can't guarantee that updating a single autoinstaller will cover all of the plugins. We can change this, as long as we can guarantee that the plugins installations state stays correct.

iclanton avatar Dec 03 '25 19:12 iclanton

Thank you for the explanation about the design about rush update currently handles rush plugins management.

Is it possible to add parsing for the common/config/rush/rush-plugins.json configuration in the update-autoinstaller action? The general logic I have in mind is as follows:

  1. While installing dependencies via rush update-autoinstaller --name my-auto, filter out the packageName entries in common/config/rush/rush-plugins.json whose autoinstallerName matches the name parameter passed.

  2. Copy the rush-plugin-manifest.json file from common/autoinstallers/my-auto/node_modules into the currently executing autoinstaller rush-plugins directory.

This process should not affect the current execution logic or results of rush update.

LPegasus avatar Dec 04 '25 06:12 LPegasus