Skip to content

watch fails with many packages and tui #11912

@ottob

Description

@ottob

Verify canary release

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

Link to code that reproduces this issue

n/a medium sized private monorepo

Which canary version will you have in your reproduction?

2.8.11-canary.5

Environment information

• turbo 2.8.11-canary.5
CLI:
   Version: 2.8.11-canary.5
   Path to executable: /Users/ottob/dev/turbo-mono/node_modules/.bun/turbo-darwin-arm64@2.8.11-canary.5/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: bun

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

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

Expected behavior

Successful build and watch of all packages (around 50).

Im starting with turbo with: turbo watch build --filter=./packages/*

Actual behavior

After some seconds it aborts with

$ bun run clean && tsc
$ rm -rf dist
└─ @repo/payments#build ──
    ...Finishing writing to cache...                                                                    ...Finishing writing to cache...                                                                    ...Finishing writing to cache...                                                                    ...Finishing writing to cache...                                                                    ...Finishing writing to cache...  
 × Could not connect to UI thread: some packages changed: Failed to send event to TUI: channel
  │ closed

error: script "watch:packages" exited with code 1

If I run the same command again it builds more packages, and then after some tries, the builds are complete and it starts watching.

To Reproduce

  1. bun run turbo daemon clean
  2. turbo watch build --filter=./packages/*

I can temporarily invite somebody to our repository.

Additional context

turbo.json

{
  "$schema": "https://turborepo.com/schema.json",
  "ui": "tui",
  "concurrency": "100%",
  "tasks": {
    "//#format-and-lint": {
      "dependsOn": ["//#lint", "//#format"]
    },
    "//#format-and-lint:fix": {
      "dependsOn": ["//#lint:fix", "//#format:fix"]
    },
    "//#lint": {},
    "//#lint:fix": {},
    "//#format": {},
    "//#format:fix": {},
    "build": {
      "dependsOn": ["^build"],
      "inputs": ["$TURBO_DEFAULT$", ".env*"],
      "outputs": ["dist/**", ".next/**", "!.next/cache/**"]
    },
    "clean": {
      "cache": false
    },
    "test": {
      "dependsOn": ["^build"]
    },
    "lint": {
      "dependsOn": ["^lint"]
    },
    "check-types": {
      "dependsOn": ["^check-types"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions