rushstack
rushstack copied to clipboard
[rush] Allow `rushx` to write to cache
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.
Couple things here:
-
rushx
currently just runs the script inpackage.json
'sscripts
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.