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

package.json in ignored .next directory is listed in turbo run build --dry #878

Closed weyert closed 1 year ago

weyert commented 2 years ago

What version of Turborepo are you using?

main

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

pnpm

What operating system are you using?

Mac

Describe the Bug

I am trying out the --dry-run functionality of the trunk / main-branch (manually build). If I try to call the command it's not failing but it is listing an unexpected nameless package:


Packages in Scope
Name                                  Path                                   
                                      projects/example/.next                
@company/account-api                   services/account-api                   
@company/api                           services/api                           

The line with projects/example/.next is unexpected and I am not sure if this affects the execution of commands or the remote caching functionality

If I check with git whether this directory is in my .gitignore list then it appears to be so:

monorepo-playground on  chore-upgrade-dependencies [$⇡] via  v16.13.2
❯ git check-ignore -v projects/example/.next 
projects/example/.gitignore:15:/.next/ projects/example/.next

Expected Behavior

I would expect that the directories, especially package.json-files inside git-ignored directories won't be considered in the graph and/or dry-run command

To Reproduce

Work in progress

jlarmstrongiv commented 2 years ago

If you rely on git, you can list all included files via git ls-files or all ignored files with git status --ignored. Respecting the .gitignore file would be great

weyert commented 2 years ago

Ain't that the same as executing git check-ignore -v projects/example/.next that I tried?

mehulkar commented 1 year ago

@weyert I know this is way late (and thank you for filing!) but are you still seeing this? I'd be surprised if it was true now

weyert commented 1 year ago

Let's close it. I don't think I have seen this issue or at least haven't noticed it for a while