Skip to content

Conversation

@LukeMathWalker
Copy link
Owner

@LukeMathWalker LukeMathWalker commented Jan 17, 2026

Extract the JSON documentation caching logic from pavexc into a new crate pavexc_rustdoc_cache.

The rustdoc cache was invalidated on every git commit because the database filename included the git SHA ({VERSION}-{GIT_SHA}.db). This was problematic during local development: each commit wiped the cache, forcing expensive re-computation of JSON docs.

The cache fingerprint is now {VERSION}-{SOURCE_HASH} where:

  • VERSION is pavexc_rustdoc_cache's crate version
  • SOURCE_HASH is an xxhash of the source files in pavexc_rustdoc_cache and its local dependencies {pavexc_attr_parser, pavex_bp_schema)

The hash is computed in pavexc/build.rs by automatically discovering path dependencies from Cargo.toml.

@LukeMathWalker LukeMathWalker marked this pull request as ready for review January 17, 2026 15:49
@LukeMathWalker LukeMathWalker changed the title Extract JSON computation and caching into a separate crate chore: Extract JSON computation and caching into a separate crate Jan 17, 2026
@LukeMathWalker LukeMathWalker merged commit 1b1a8ac into main Jan 17, 2026
33 checks passed
@LukeMathWalker LukeMathWalker deleted the extract-json-handling branch January 17, 2026 15:50
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.

2 participants