Repository navigation
Dev container: ccache's cache in a volume of its own - #106
Merged
Merged
Conversation
ccache kept what the host builds compiled in ~/.cache/ccache, on the container's own file system, which a rebuild throws away: the first make check after one compiled everything again. A named volume keeps it, as uv's cache and the Arduino core are kept; the Dockerfile makes the path as the remote user first, as for those.
theAndreas
force-pushed
the
ccache-volume
branch
from
November 16, 2026 15:36
acaebc2 to
b394d3d
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ccache made a fresh worktree's builds fast (v0.11.1), but its cache lay in
~/.cache/ccacheon the container's own file system, which a rebuild of the dev container throws away. The firstmake checkafter a rebuild compiled every host build again; in MaxMatrix, after a rebuild today, 113 of 688 compiles hit the cache.The cache now lives in a named volume of its own,
<namespace>-ccache, as uv's cache and the Arduino core already do. The Dockerfile creates the path as the remote user first, as it does for those, so that the empty volume is not owned by root. The template's own dev container gets the same volume, for the projectstests/check.shbuilds.For a project: after
copier update, rebuild the dev container. The volume starts empty and fills with the first build.How it was checked: a project made from this branch passes
tests/check.sh lint; its rendereddevcontainer-feature.jsonand the repository's parse, with the new mount among the others. Not checked: a rebuild with the volume, as there is no Docker in this container. The first rebuild after the update shows it:ccache -sshould report hits on the secondmake checkafter a rebuild, andls -ld ~/.cache/ccacheshould show the remote user as its owner.