Skip to content

[rush] Let's document best practices for WSL + Rush #231

Description

Relatively few people are using Windows Subsystem for Linux (WSL) with Rush.

In a recent Zulip thread, Jiří Kantor (@akres) encountered some problems where Rush's incremental builds were not calculated correctly:

The incremental build feature works, but sometimes triggers a full rebuild while nothing has changed. That wouldn't be so bad. The flip side of the same issue is that when there is a change, the package sometimes does not rebuild, which makes it largely unusable.

I have done a bit of digging and found that the issue happens in https://github.com/microsoft/rushstack/blob/main/libraries/package-deps-hash/src/getRepoState.ts#L309 getRepoStateAsync

I did some debugging and found that the git status call quite frequently (about 50% of times, for me) returns an empty output, so the hashes, which this function returns, are that of the repo in its unmodified state.

I was pointed in this direction by https://stackoverflow.com/a/55692650 this comment. It seems that the issue really comes from two git commands running simultaneously, because when I tried to play with the code that I have locally and I serialized the calls, the issue disappeared.

Reply to this thread with any wisdom, recommendations, or workarounds for WSL+Rush. Then we can write up a website documentation page providing guidance for best practices with WSL.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions