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

Turbo only cache files at the start of a command, resulting in erroneous format/linting cache hit #10111

@BayLee4

Description

@BayLee4

Verify canary release

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

Link to code that reproduces this issue

https://github.com/BayLee4/turbo-bug

Which canary version will you have in your reproduction?

2.4.5-canary.2

Enviroment information

turbo 2.4.5-canary.2

CLI:
   Version: 2.4.5-canary.2
   Path to executable: ~/Downloads/turbo-bug/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: pnpm9

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

Environment:
   CI: None
   Terminal (TERM): xterm-ghostty
   Terminal program (TERM_PROGRAM): ghostty
   Terminal program version (TERM_PROGRAM_VERSION): 1.1.2
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

Turbo should not hit cache when a source file hash has changed

Actual behavior

Turbo hits cache when a source file hash has changed

To Reproduce

pnpm install
yes | pnpm dlx shadcn@canary add button -c packages/ui # will modify button.tsx
pnpm format --filter=@workspace/ui # correctly restore it to baseline (no cache hit)
yes | pnpm dlx shadcn@canary add button -c packages/ui # will modify it again
pnpm format --filter=@workspace/ui # cache hit, full turbo, format skipped

Additional context

I verified using --summarize that the hash is correctly updated between commands, but it still hit cache

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