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
Commit 4665133
Browse filesBrowse the repository at this point in the historyBrowse files
Design-time cache: serve one stable generation per static parameters
Root-caused the intermittent FS0193/FS0001 "type X is not compatible
with type X" CI failures: the F# compiler consumes target-model
provided types that the TypeProvider SDK memoizes keyed on the
identity of our source types (fixed separately in the SDK, see
fsprojects/FSharp.TypeProviders.SDK#521). That makes source-root
identity per static-parameter set a correctness contract for the
design-time cache, not just a caching policy.
Two mechanisms in the cache could violate it:
- The stale-while-revalidate background refresh rebuilt the root and
swapped it under a live key, so a compilation running longer than
the staleness window could observe two generations of the same
erased types. It also opened one design-time connection per refresh
that was only disposed at TP unload. Removed; schema changes are
picked up by the idle-eviction rebuild or explicitly via
ClearDatabaseSchemaCache.
- Idle eviction at 3 minutes could evict between two requests of one
long compilation, with the same two-generation effect. Raised to 30
minutes; memory/connection cleanup and eventual schema pickup are
preserved.
Kept unchanged: GetOrAdd + Lazy (one build per key, concurrent
requests share it), Interlocked LastAccess, the idle watcher, and the
identity-checked faulted-entry eviction (transient connection
failures retry instead of serving the Lazy's cached exception).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments