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

When inputs is used, turbo can't detect file content changes. #1473

@promer94

Description

@promer94

What version of Turborepo are you using?

1.2.9

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

pnpm

What operating system are you using?

Mac

Describe the Bug

When inputs is specified, the task will only rerun if it is your first change or you commit your change. If you change your file content again, the task will reuse cache and produce stale outputs.

Expected Behavior

turbo should always rerun the task if file content is changed.

To Reproduce

  1. Create a turborepo
npx create-turbo
  1. Add inputs to turbo.json
{
  "pipeline": {
    "build": {
      "dependsOn": [
        "^build"
      ],
      "outputs": [
        "dist/**",
        ".next/**"
      ],
      "inputs": [
        "pages/**",
        "next.config.js",
        "package.json",
        "tsconfig.json"
      ]
    },
    "lint": {
      "outputs": []
    },
    "dev": {
      "cache": false
    }
  }
  1. Init git and commit changes.
  2. Change /apps/web/pages/index.tsx
  • add console.log('123'). turbo could detect this change and rebuild
  • change file to console.log('456'). turbo couldn't detect this.

Screen Shot 2022-07-03 at 19 06 56

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions