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

Incorrect/misleading deprecation warning for --remote-cache-read-only #9699

@msv-ttd

Description

@msv-ttd

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://gist.github.com/27256a935dcc6ed8c67d5e270ed75e14.git

Which canary version will you have in your reproduction?

turbo@2.3.4-canary.7

Enviroment information

CLI:
   Version: 2.3.2
   Path to executable: /Users/user/src/repo/node_modules/.pnpm/turbo-darwin-arm64@2.3.2/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: pnpm

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 15357
   Available CPU cores: 14

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): vscode
   Terminal program version (TERM_PROGRAM_VERSION): 1.96.2
   Shell (SHELL): /opt/homebrew/bin/bash
   stdin: false

Expected behavior

When running turbo with the --remote-cache-read-only flag, a deprecation warning is emitted:

WARNING --remote-cache-read-only is deprecated and will be removed in a future major version. Use --cache=remote:r

My expectation is that replacing the old flag with the new flag won't impact any local caching and just configure remote cache to read-only.

Actual behavior

The suggested configuration seems to have an effect equal to --cache=local:,remote:r which means no local cache and read-only remote cache. This means that if I just blindly follow the stated advice, I'm disabling local caching completely.

To Reproduce

# first, deprecated flag
turbo run test --remote-cache-read-only
turbo run test --remote-cache-read-only  # this is FULL TURBO

# now the new flag
turbo run test --cache=remote:r
turbo run test --cache=local:,remote:r              # no caching 

# now correct
turbo run test --cache=local:rw,remote:r

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions