You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the repro repo, the "build" command has caching enabled. Running it (pnpm build at root) does the correct thing in response to modifying file contents, but renaming the file exhibits a couple strange behaviors. The repro steps walk through a series of actions to encounter several unexpected symptoms, annotated with ❌. I believe this is a regression, since I repro on nx 18.3.4 but not 17.0.6.
Expected Behavior
Renaming the file should have similar impact on determining cache hits as modifications to file contents.
Observe the build command DOES get a cache hit, which is surprising since we renamed the file ❌
Observe packages/testPackage/built is missing the expected woz.js (but still has the foo.js and bar.js files as expected since we didn't do anything to delete them). ❌
pnpm clean at repo root (which will delete the built output)
mv packages/testPackage/woz.ts packages/testPackage/foo.ts (returning the file name back to the original state)
pnpm build at repo root
Observe the build command DOES get a cache hit, which is expected since we built with foo.ts in step 3 ✅
Observe packages/testPackage/built has the expected foo.js, but surprisingly also has bar.js (which was not part of the output from step 3). ❌
Same for me here, I have GQL files that we generate TS file from. the task to generate the files id dependant on **/*.gql files.
Editing or creating new files works great, but when moving or renaming files the cache misses the changes and loads the cached task output.
Current Behavior
In the repro repo, the "build" command has caching enabled. Running it (
pnpm build
at root) does the correct thing in response to modifying file contents, but renaming the file exhibits a couple strange behaviors. The repro steps walk through a series of actions to encounter several unexpected symptoms, annotated with ❌. I believe this is a regression, since I repro on nx 18.3.4 but not 17.0.6.Expected Behavior
Renaming the file should have similar impact on determining cache hits as modifications to file contents.
GitHub Repo
https://github.com/ChumpChief/nx-repro
Steps to Reproduce
Prereq: pnpm globally installed
pnpm i
at repo rootpnpm build
at repo rootpackages/testPackage/built
contains the expectedfoo.js
✅mv packages/testPackage/foo.ts packages/testPackage/bar.ts
at repo rootpnpm build
at repo rootpackages/testPackage/built
contains the expectedbar.js
(and still hasfoo.js
which is expected since we didn't do anything to delete it). ✅mv packages/testPackage/bar.ts packages/testPackage/woz.ts
pnpm build
at repo rootpackages/testPackage/built
is missing the expectedwoz.js
(but still has thefoo.js
andbar.js
files as expected since we didn't do anything to delete them). ❌pnpm clean
at repo root (which will delete thebuilt
output)mv packages/testPackage/woz.ts packages/testPackage/foo.ts
(returning the file name back to the original state)pnpm build
at repo rootfoo.ts
in step 3 ✅packages/testPackage/built
has the expectedfoo.js
, but surprisingly also hasbar.js
(which was not part of the output from step 3). ❌Nx Report
Failure Logs
Package Manager Version
9.0.6
Operating System
Additional Information
tsc --init
.The text was updated successfully, but these errors were encountered: