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

Caret (^) isn't correctly evaluated for phantom Turbo tasks #10109

@JavaScriptBach

Description

@JavaScriptBach

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/JavaScriptBach/turbo-caret-bug

Which canary version will you have in your reproduction?

2.4.5-canary.1

Enviroment information

turbo 2.4.5-canary.1

CLI:
   Version: 2.4.5-canary.1
   Path to executable: /Users/philliphuang/turbo-caret-bug/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: berry

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

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): Apple_Terminal
   Terminal program version (TERM_PROGRAM_VERSION): 455
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

In my repository, I have tasks defined in turbo.json that contain a dependsOn but don't have an accompanying implementation in package.json. I use these "phantom" tasks as a way to specify relationships between real tasks and also to DRY between many packages in a mono-repo.

The problem is that the caret (^) behavior is not correctly evaluated when running a phantom task. If I have packages a, b, c where c depends on b which depends on a, then running turbo c#my-task does not run a's tasks, even when the dependency chain is properly set up.

See https://github.com/JavaScriptBach/turbo-caret-bug

Actual behavior

See https://github.com/JavaScriptBach/turbo-caret-bug

To Reproduce

See https://github.com/JavaScriptBach/turbo-caret-bug

Additional context

No response

Metadata

Metadata

Assignees

Labels

area: docsImprovements or additions to documentationkind: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions