Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cached task overwrites modified top level files (that are outside of src/) #766

Open
harunurhan opened this issue Jun 26, 2024 · 1 comment

Comments

@harunurhan
Copy link
Member

harunurhan commented Jun 26, 2024

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. Define a package with a target and no inputs and outputs specified, and package needs to have some files under src/ folder and top level like jest.config.js
  2. Run the task once (so it's cached)
  3. Make a change to a top-level file
  4. Re-run the same task (it should be skipped)
  5. You will see that changes you made to the top level file are reverted after the cached/skipped task run. Observe that this isn't valid for files that starts with . like .eslintrc.js

Expected behavior

Cached task runs should not revert any changes by default. Although it can be worked around using inputs and outputs, it's a strange default behaviour.

Environment/Troubleshooting

@harunurhan
Copy link
Member Author

Strange thing is that if I specify input: ["*"], everything works correctly but I don't understand how * glob could be the fix here.

  • if <package>/src/foo.js changes, cache is invalidated (but HOW?)
  • if <package>/.foorc.js changes, cache is invalidated
  • if <package>/foo.js changes, cache is invalidated
  • If <packages>/dist/foo.js changes, cache is NOT invalidated (which is what I want but still strange)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant