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

Changes to files in a package that don't match whitelisted inputs are still causing fingerprint to change. #1198

@sppatel

Description

@sppatel

What version of Turborepo are you using?

1.2.8

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

Yarn v1

What operating system are you using?

Mac

Describe the Bug

I discovered this in my own project but it is reproducable with the turbo example project. For a given task in turbo.json if you update the the inputs to only consider changes to a particular file extension (lets say **/*.js for example) and then add a text file (foo.txt) to the project and then rebuild - this triggers a new fingerprint and a rebuild. (Nothing else in the project has changed and the previous build result is cached).

The inputs do not seem to be accounted for when calculating the finger print as described https://turborepo.org/docs/core-concepts/caching#hashing

Expected Behavior

If the input of the task only considers **/*.js and you add a text file to the project and rebuild, the finger print should not change.

To Reproduce

  1. npx create-turbo@latest.
  2. Update turbo.json's build to add in input of.. ["**/*.tsx"]
  3. yarn run build (cache miss)
  4. yarn run build again (cache hit)
  5. add foo.txt file inside of apps/web/pages.
  6. yarn run build (cache miss)

Step 6 should be a cache hit because the only change was adding a text file that does not match the input filter.

Metadata

Metadata

Assignees

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