rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] Allow `rushx` to write to cache

Open Faithfinder opened this issue 2 years ago • 1 comments

All in the topic, really. Sometimes I build a library I work on with rushx. Could be nice if it made it restorable later.

I guess I could change my workflow to use rush build --o . instead, but it's just slightly more typing.

Feel free to close this if you feel like it's not worth the effort.

Faithfinder avatar Jun 22 '22 21:06 Faithfinder

Couple things here:

  • rushx currently just runs the script in package.json's scripts block. It doesn't run the Rush command. This design could be revisited, though.
  • Writing to cache is blocked for projects whose dependencies aren't built by the command being run (i.e. - if rush build -o . is run on a project with dependencies, cache write is blocked). This is because we can't guarantee that the project's dependencies are up-to-date without building them in the same command, and writing a cache entry for a project with out-of-date dependencies could result in an invalid cache entry being created.

iclanton avatar Jun 27 '22 18:06 iclanton