[rush] Install can't be skipped with useWorkspaces and git checkout #2371
Labels
effort: medium
Needs a somewhat experienced developer
enhancement
The issue is asking for a new feature or design change
Summary
With Gitlab CI, I try to skip install by marking
common/temp
as cache but install still runs.Repro steps
In a rush repo,
git checkout A
rush install
git checkout B
touch some/project/package.json
git checkout A
rush install
Expected result:
Don't run the second install.
Actual result:
The second install runs.
Details
canSkipInstall compares mtime of
common/temp/last-install.flag
and each project'spackage.json
(#2029).common/temp/last-install.flag
's mtime is preserved because of cache, but mtime of each project'spackage.json
is not preserved by git checkout so it can be more recent than flag's even though the file content remains the same, and that the install step won't be skipped.Although all the packages are reused, the install step still takes tens of seconds.
Maybe keeping MD5 hash of
package.json
in the flag file or somewhere else will fix this.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: