-
Notifications
You must be signed in to change notification settings - Fork 449
test: showcase impact of cache disabled #12308
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Louis Roché (Ahrefs) <[email protected]>
1818c94
to
e4ed9b0
Compare
Initial build, populating cache | ||
|
||
$ dune build --config-file config | ||
$ wc -l _build/log |
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.
I would have preferred to cat _build/log
but some lines are starting with $
and it confuses the cram tests on subsequent runs.
|
||
$ dune build --cache=disabled --config-file config | ||
$ wc -l _build/log | ||
22 _build/log |
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.
given that _build is still populated from the previous build, why do we have more stuff being built?
|
||
$ dune build --cache=disabled --config-file config | ||
$ wc -l _build/log | ||
17 _build/log |
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.
here is it the same as during the second build, as expected
$ dune clean --config-file config | ||
$ dune build --config-file config | ||
$ wc -l _build/log | ||
22 _build/log |
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.
shared cache is warm but more stuff is built?
$ dune clean --config-file config | ||
$ dune build --config-file config | ||
$ wc -l _build/log | ||
22 _build/log |
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.
given that _build is still populated from the previous build, why do we have more stuff being built?
Whether an action is decided to be re-executed depends on whether the cache is set. It is done this way so that running a build with the cache enabled will always populate the cache if possible (the cache is populated after the cache is re-ran). So all of this is expected behavior. It might be suboptimal, but dune isn't really meant to be used with the cache toggled on and off. I think there's already a test for this behavior, do you mind checking the tests to confirm? I don't want to add more duplication to the test suite. |
I think I don’t understand what “the cache is set” means then. Because to me as a user there’s no obvious reason for the things to happen this way, and especially to have different behavior with |
Adding a test to show the different behaviors of
dune build --cache=disabled
depending on how the shared cache is setup.