-
Notifications
You must be signed in to change notification settings - Fork 412
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
Add an option to debug Dune's metabolism #4412
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Dune's metabolism should better be kept in check.
Seems to be flaky though -- in one of the test runs the change was apparently unnoticed? |
Could it be caused by low filesystem time resolution? I thought we had a fix for that. |
Not sure it's only about time resolution: if I understand correctly, the file size should have changed too. It seems like we're just observing stale results on the second run. |
Alright, back to CI debugging 😭 |
🤔 |
Oh, I think I got it. I accidentally removed a call to |
Interesting: I added a debug print for when we drop entries because their mtime is the same as the fs clock, and it appears that we drop on Linux as well, which I didn't expect. The entry in question was |
So here we were effectively dropping the entry for |
I have already learned something with this option: in the digest cache, we save a reduced version of the file stats to detect when the file changes. However, when we do that for targets we use the stats before removing the write permissions, which means that during the second build we always re-hash everything 🤦 Writing a PR to fix this. |
Signed-off-by: Jeremie Dimino <[email protected]>
Fixed in #4419. @aalekseyev I also ended up adding this option to wait for the FS clock as there was too much noise. |
This PR add an option
--debug-digests
that makes Dune explain why it decides to re-digest some files:I've sometimes wondered why Dune was re-digesting some files. This should help understand why.