Skip to content

Conversation

@ElectreAAS
Copy link
Collaborator

@ElectreAAS ElectreAAS commented Dec 16, 2025

Follow-up to #12858, the documentation needs to be updated to show where things go.

Draft mode because I'm not the best technical writer

Rendered output visible here https://dune--12983.org.readthedocs.build/en/12983/reference/caches.html

command.
- The toolchains cache: contains the compiler (and compiler variants) when they
can't be installed as standard packages.
- The revision store: contains packaging information fetched from package
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it is a git repository containing all revisions fetched via git.

I believe it is also used when we fetch a package via git (e.g. pinned packages).

Dune implements a cache of build results that is shared across different
workspaces. Before executing a build rule, Dune looks it up in the shared
Before executing a build rule, Dune looks it up in the shared
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not introduced in this PR but I think it would be nice to know what "it" actually is. Otherwise this is very vague.

@Alizter
Copy link
Collaborator

Alizter commented Dec 18, 2025

I would transpose the table, if we have other caches we will run out of width.

Dune implements several different caches:

- The build cache: contains build artifacts that are shared across different
workspaces. This is the main cache, interacted with with the ``dune cache``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
workspaces. This is the main cache, interacted with with the ``dune cache``
workspaces. This is the main cache, interacted with via the ``dune cache``

Comment on lines 18 to 19
Before executing a build rule, Dune looks it up in the shared
cache, and if it finds a matching entry, Dune skips the rule's execution and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issues @Leonidas-from-XIV points out here is a result of 'it' being used with two different referents: first to 'a build rule' then to dune (or dune's cache looking up).

@ElectreAAS ElectreAAS marked this pull request as ready for review December 19, 2025 14:34
@Alizter
Copy link
Collaborator

Alizter commented Dec 19, 2025

Let's leave the LMDB cache out of this document for now. We are waiting on introducing the versioning #12637 and if we end up using this for other parts of Dune we might need to move it anyway, making it unrelated to the revision store.

On Windows, you can replace ``XDG_CACHE_HOME`` by ``%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files``

.. note::
It is in fact ``git-repo`` (with a dash) and ``rev_store`` (with an underline)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably change the names to be more descriptive, because this whole thing is very confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep that's the confusion I wanted to get in front of in the docs, but obviously fixing it is also good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants