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
When I add the following to the .nxignore file in the root of the project
nx.json
tsconfig.json
If I run testing (or building, any cacheable operator) for a library/app and then change a change in one of those files (say, generating a new library), the cache is busted for the prior operation.
Expected Behavior
I would expect that generating a library (ie. changing nx.json or tsconfig.json) should not bust the cache for unaffected libraries/apps, unless the newly generated library is used in that lib/app in which case the code would have actually been affected.
Steps to Reproduce
I tried it in my repo (on Nx 9.7.0) and it didn't work so I generated a brand new workspace with npx create-nx-workspace@latest (Nx v10.3.0) and tried it, same problem.
Steps:
Choose Ng + Nest workspace with Ng CLI
Do not enable cloud caching (but still use local caching)
add nx.json and tsconfig.json to .nxignore (will need to create the file)
Run tests on api-interfaces
Run tests on api-interfaces (this one pulls from cache)
Generate a new library
Run tests on api-interfaces (does not pull from cache)
Environment
Fresh workspace
nx : Not Found
@nrwl/angular : 10.3.0
@nrwl/cli : 10.3.0
@nrwl/cypress : 10.3.0
@nrwl/eslint-plugin-nx : 10.3.0
@nrwl/express : Not Found
@nrwl/jest : 10.3.0
@nrwl/linter : 10.3.0
@nrwl/nest : 10.3.0
@nrwl/next : Not Found
@nrwl/node : 10.3.0
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 10.3.0
@nrwl/web : Not Found
@nrwl/workspace : 10.3.0
typescript : 4.0.3
And My Workspace
@nrwl/angular : 9.7.0
@nrwl/cli : 9.7.0
@nrwl/cypress : 9.7.0
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : 9.7.0
@nrwl/jest : 9.7.0
@nrwl/linter : 9.7.0
@nrwl/nest : 9.7.0
@nrwl/next : Not Found
@nrwl/node : 9.7.0
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.7.0
@nrwl/web : Not Found
@nrwl/workspace : 9.7.0
typescript : 3.8.3
The text was updated successfully, but these errors were encountered:
To note: it seems as though .nxignore is correctly ignore when using commands like affected:libs but when the cache key is computed for a library I don't think they are being ignored.
We chatted here #3942 and concluded that the solution is to provide more intelligent hashing of nx.json, tsconfig.json and workspace.json. So I'm going to close this issue.
Current Behavior
When I add the following to the
.nxignore
file in the root of the projectIf I run testing (or building, any cacheable operator) for a library/app and then change a change in one of those files (say, generating a new library), the cache is busted for the prior operation.
Expected Behavior
I would expect that generating a library (ie. changing nx.json or tsconfig.json) should not bust the cache for unaffected libraries/apps, unless the newly generated library is used in that lib/app in which case the code would have actually been affected.
Steps to Reproduce
I tried it in my repo (on Nx 9.7.0) and it didn't work so I generated a brand new workspace with
npx create-nx-workspace@latest
(Nx v10.3.0) and tried it, same problem.Steps:
Choose Ng + Nest workspace with Ng CLI
Do not enable cloud caching (but still use local caching)
add
nx.json
andtsconfig.json
to.nxignore
(will need to create the file)Run tests on
api-interfaces
Run tests on
api-interfaces
(this one pulls from cache)Generate a new library
Run tests on
api-interfaces
(does not pull from cache)Environment
Fresh workspace
And My Workspace
The text was updated successfully, but these errors were encountered: