vercel / turborepo

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

[turborepo] Doc bug #5556

Closed HamzaAmar closed 1 year ago

HamzaAmar commented 1 year ago

What version of Turborepo are you using?

latest

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

Yarn v1

What operating system are you using?

Windows

Describe the Bug

There appears to be an error in the documentation that causes Turbo to malfunction when filtering with a directory in a monorepo. For example, when attempting to build all the packages within the apps directory, Turbo may malfunction.

Expected Behavior

To ensure the filter is running efficiently.

To Reproduce

when I run this command from the doc it does not work correctly turbo run build --filter='./apps/*' from this URL

• Packages in scope:
• Running build in 0 packages
• Remote caching disabled

No tasks were executed as part of this run.

 Tasks:    0 successful, 0 total
  Time:    111ms ed, 0 total

but when i use it this way it work correct turbo run build --filter=./apps/* From this url

• Packages in scope: @pillar/docs, @pillar/stories
• Running build in 2 packages
• Remote caching disabled

Reproduction Repo

https://turbo.build/repo/docs/core-concepts/monorepos/filtering#filter-by-directory

chris-olszewski commented 1 year ago

The former quoted filter ('./apps/*') should be the correct usage, without quotes your shell will attempt to expand the globs in your filter. Could you run turbo info and give me the results as that will give some insight into how your workspaces are laid out.

HamzaAmar commented 1 year ago

How can I do turbo info

Commands:
  bin         Get the path to the Turbo binary
  completion  Generate the autocompletion script for the specified shell
  daemon      Runs the Turborepo background daemon
  link        Link your local directory to a Vercel organization and enable remote caching
  login       Login to your Vercel account
  logout      Logout to your Vercel account
  prune       Prepare a subset of your monorepo
  run         Run tasks across projects in your monorepo
  unlink      Unlink the current directory from your Vercel organization and disable Remote Caching

These are the only commands that exist, but some warnings appear in the terminal. WARNING failed to contact turbod. Continuing in standalone mode: connection to turbo daemon process failed. Please ensure the following:

chris-olszewski commented 1 year ago

If you're on the latest version of turbo (1.10.8) it should be an available command. Can you give me the output of turbo --version -vv?

HamzaAmar commented 1 year ago

Yeah, I am currently using version 1.9.3 Okay, I'm going to upgrade it and I'll let you know the result of turbo info

HamzaAmar commented 1 year ago

this is the output of turbo info

8 packages found in workspace

- @pillar/core packages\pillar-core\package.json
- @pillar/docs apps\docs\package.json
- @pillar/eslint packages\pillar-eslint\package.json
- @pillar/hooks packages\pillar-hooks\package.json
- @pillar/icons packages\pillar-icons\package.json
- @pillar/stories apps\stories\package.json
- @pillar/tsconfig packages\pillar-tsconfig\package.json
- @pillar/utils packages\pillar-utils\package.json
chris-olszewski commented 1 year ago

Those look like Windows style paths, not Mac paths. Can you confirm you're using Windows and also include what terminal emulator/command prompt you're using?

HamzaAmar commented 1 year ago

@chris-olszewski I am so sorry for the mistake I made.cmder

chris-olszewski commented 1 year ago

No problem, just wanted to make sure I was understanding the situation. I was able to reproduce on my Windows machine using cmder. Not that it's a long term solution, but I noticed that the issue doesn't seem to be present if using Git bash as my terminal.