-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
cache/hashing is unclear and will invalidate caching on projects that do not have node
dependencies
#26915
Comments
@AgentEnder @juristr is there something wrong at my understanding the Mental Model using external dependencies like |
I've been able to pinpoint it a little more closely for a more real-life scenario at https://github.com/EelcoLos/nx-tinkering . So, upon pointing out a more real life scenario, I updated all npm packages today resulting in EelcoLos/nx-tinkering#2 . |
I'm also hoping to get to know how to create your own hasher with a plugin. I'd like to create a plugin using a language not using |
I'm wondering if this is helping or not: What i'm noticing myself upon starting a new repo with adding |
this was solved by @AgentEnder at nx-dotnet/nx-dotnet#861 (comment)
|
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Running
affected
on projects should only have projects affected by the hashing concept stated by https://nx.dev/concepts/mental-model#computation-hashing-and-caching. However, when only changing a trivial item at top level lock files (yarn.lock
/package-lock.json
) seem to change the hash/cache of any project, regardless ofinput
exclusion, or basically anything.EDIT:
Although the example will show the trivial part, when actually updating packages, this actually affects the cache
Updated a slightly more real example in the comment below: #26915 (comment)
My tests are solely regarding
dotnet
projects in regards to integrated monorepos.Expected Behavior
I would expect some control to state files not affecting
GitHub Repo
https://github.com/nx-dotnet/nx-dotnet
Steps to Reproduce
yarn install
npx nx show projects
. This will show the a project calleddemo-csharp-models
, which is solely adotnet
project.yarn.lock
file with something trivial like adding a '# test'comment on top of the file ie:npx nx show project --affected
. the projectdemo-csharp-models
is affected. This would be problematic already.inputs
to theprojects.json
atdemo\libs\csharp-models\project.json
:npx nx show project --affected
again. Still, the project is affected.Nx Report
Failure Logs
No response
Package Manager Version
1.22.17
Operating System
Additional Information
This is also the case for NX 18+ and project crystal inferred tasks.
I tried addressing this issue at multiple locations, but no actual solution is provided, not information shared on how to at least gain more insight:
I really like nx and try to advocate for using monorepos at my organization. However, there is a huge use of various platforms and languages. I feel though computation caching for monorepos is a must for my endavour to succeed in my organization
The text was updated successfully, but these errors were encountered: