vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.12k stars 1.8k forks source link

[VS Code Extension] Transit Nodes gives `turbo:no-such-task` error #8577

Open jeniabrook opened 3 months ago

jeniabrook commented 3 months ago

Verify canary release

Link to code that reproduces this issue

n/a

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

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

n/a

Describe the Bug

Setting a transit node in the turbo.json file:

"tasks": {
  "topology": {
    "dependsOn": ["^topology"]
  }
}

Raises an error:

The task `topology` does not exist. (turbo:no-such-task)

Screenshot from VS Code: Screenshot 2024-06-23 at 18 57 26

Expected Behavior

Add a whitelist for the extension that will ignore those special tasks:

"turbo.transitNodes": ["topology"]

Or maybe to detect it automatically (not sure if possible).

To Reproduce

  1. Install Turborepo LSP v1.1.3
  2. Install turborepo v2.0.4
  3. Create in turbo.json a transit node

Additional context

No response

aryanprince commented 2 months ago

I have the same issue with a Turborepo using pnpm workspaces on a Mac. The error makes sense cus Transit Nodes have to use the name of a script that does not exist anywhere in the project as mentioned here.

Hoping some sort of whitelist behavior could be added like @jeniabrook mentioned.

Alternatively, it would be nice if we had a certain keyword like transit or topo as a fixed Transit Node name for everyone - as it currently seems too 'vague' to have any random keyword as the Transit Node task name.

For context, this was still an issue with the latest versions - turbo v2.0.9 and the Turborepo LSP VSCode Extension v2.0.0