这是indexloc提供的服务,不要输入任何密码
Skip to content

Inconsistent remote caching on Windows #801

@GeeWizWow

Description

@GeeWizWow

What version of Turborepo are you using?

1.1.4

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Windows / Linux (WSL)

Describe the Bug

For the same codebase:

  • Windows generates different hashes to Linux
  • Windows fails to leverage remote cache, where as Linux does

Expected Behavior

  • Windows should generate the same hashes as Linux or vice versa
  • Windows should leverage remote cache under the same circumstances as Linux

To Reproduce

Setup

In both a Windows and Linux environment, run the following:

  1. Run npx create-turbo@latest - using yarn v1 and accepting all other defaults
  2. Move to my-turborepo and edit the package.json to contain the following:
    -    "build": "turbo run build"
    +    "build": "turbo run build -vvv --api=http://localhost:5001 --team=test --token=test",
    +    "clean": "rm -rf node_modules/.cache/turbo && rm -rf apps/*/.next && rm -rf apps/*/.turbo && rm -rf packages/*/dist && rm -rf packages/*/.turbo",
  3. Run the following commands: yarn clean && yarn build
  4. Run the above commands a second time once the first build has completed.

Observe

On Linux:

  • Linux completes both builds producing the following hashes: 73f177e42dcb2bfe and 9ddfee65314a17a0.
  • Linux uploads the artefacts from the first run to the remote cache server.
  • On the second run Linux reproduces the same hashes, fetches artefacts from the remote cache server and produces a cache hit, replaying the output.

On Windows:

  • Windows completes both builds producing the following hashes: 82041f42cadada82 and 5f63f7c3e391c788.
  • Windows uploads the artefacts from the first run to the remote cache server.
  • On the second run Windows reproduces the same hashes, fetches artefacts from remote cache, but produces a cache miss and rebuilds the projects

Metadata

Metadata

Assignees

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