You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ClassPathFingerprints: add a kind word and move cache invalidation into Logic #301
ClassPathFingerprints (daemon/src/main/kotlin/com/specificlanguages/mops/daemon/ClassPathFingerprints.kt:29) keeps content hashes of class path files between calls. Under the design standards it is an Adapter with a cache (adapter-cache), but:
its KDoc has no kind word (kind-in-kdoc) and no Hides: line (hides-line);
it decides inline when a cached hash is still true: cachedHash (ClassPathFingerprints.kt:69) compares the stamp and applies the racy window. adapter-cache says cache invalidation is Logic that the Adapter uses (adapter-deps), in the Adapter's package.
What to build
Mark the class as an Adapter with a Hides: line and a sentence on its cache and thread safety (state-one-owner).
Move the decision "may this cached hash be reused, and may this stamp be trusted next time" into Logic in the same package, with unit tests.
Explicitly not doing
Changing what the stamp contains or the length of the racy window.
Acceptance criteria
ClassPathFingerprints contains no branch about whether a cached hash is still true.
Unit tests cover reuse, a changed stamp, a missing stamp and the racy window.
Found while reworking #217 to the rules from #300.
Activity