Skip to content

wasmtime-cache: Gate mtime in cache key on git presence, not debug_assertions#13535

Open
tomasol wants to merge 1 commit into
bytecodealliance:mainfrom
tomasol:remove-mtime-from-cache
Open

wasmtime-cache: Gate mtime in cache key on git presence, not debug_assertions#13535
tomasol wants to merge 1 commit into
bytecodealliance:mainfrom
tomasol:remove-mtime-from-cache

Conversation

@tomasol
Copy link
Copy Markdown
Contributor

@tomasol tomasol commented Jun 2, 2026

Change the codegen cache key:

  • Git builds (Wasmtime developers): cache key is {compiler}-{sha}-{mtime}, so successive local rebuilds don't share cached compilations from prior source states.
  • Non-git builds (crates.io embedders): cache key is {compiler}-{version}, which is stable across rebuilds and lets debug-build embedders reuse the cache.

debug_assertions no longer affects the cache directory.

Also fix bug where exit status of git rev-parse HEAD was not checked.

Closes #13526

…sertions

Change the codegen cache key:

* Git builds (Wasmtime developers): cache key is `{compiler}-{sha}-{mtime}`,
    so successive local rebuilds don't share cached compilations from prior
    source states.
* Non-git builds (crates.io embedders): cache key is `{compiler}-{version}`,
    which is stable across rebuilds and lets debug-build embedders reuse the
    cache.

`debug_assertions` no longer affects the cache directory.

Also fix bug where exit status of `git rev-parse HEAD` was not checked.
@tomasol tomasol requested review from a team as code owners June 2, 2026 07:45
@tomasol tomasol requested review from dicej and fitzgen and removed request for a team June 2, 2026 07:45
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.

Reuse codegen cache in debug builds of embedders

1 participant