Skip to content
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

dune cache #11163

Open
hannesm opened this issue Nov 27, 2024 · 2 comments
Open

dune cache #11163

hannesm opened this issue Nov 27, 2024 · 2 comments
Labels
shared-cache Shared artefacts cache

Comments

@hannesm
Copy link
Member

hannesm commented Nov 27, 2024

Dear Madam or Sir,

from ocaml/opam-repository#26951 I read that the dune cache is now enabled by default.

From #7819 (comment) I read "The cache at its current state is indeed problematic. I suppose that's why we do not enable it by default.".

Now I wonder, did you fix the issues that were reported with the dune cache? Or should I better put upper bounds for dune on my packages (to avoid me having to deal with cache issues)?

Is there a way (via environment variable? or a global config?) to disable dune's cache globally?

@nojb
Copy link
Collaborator

nojb commented Nov 27, 2024

did you fix the issues that were reported with the dune cache?

As far as I know (but @rgrinberg will confirm) the main issue is that if your rule has misspecified dependencies, then dune build may not correctly rebuild the corresponding targets, even after dune clean. That is why the new default only activates the cache for built-in rules (ie OCaml compilation), and not for all user rules.

Is there a way (via environment variable? or a global config?) to disable dune's cache globally?

Yes: DUNE_CACHE=disabled via the environment or (cache disabled) in your global Dune config.

@ElectreAAS
Copy link
Collaborator

Did you fix the issues that were reported with the dune cache?

If I understood correctly your initial concerns, then we have indeed fixed one with the 'safe-caching' strategy implemented in #10710 & #10944: the only things that go in the cache by default are things we know to be cache-safe.

Your other concern was about unbounded disk space: this is not currently fixed, see discussion in #8274.

@maiste maiste added the shared-cache Shared artefacts cache label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shared-cache Shared artefacts cache
Projects
None yet
Development

No branches or pull requests

4 participants