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
Fix undeterministic hash key due to pointer address in anonymous context name (#98)
`CodingKeys` is automatically derived and defined as `private`, and
types defined as private have anonymous context in its mangled name.
Then `String(reflecting:)` returns the qualified name of the type
including the anonymous context name, which contains the pointer address
like `Item.(unknown context at $55eab1620198).CodingKeys` and the address
can be different across runs due to ASLR.
So we need to stop encoding CodingKeys to reduce the possibility of
undeterministic hash key. Our hashing strategy can be still
underteministic if the cache key itself is declared as private, but
we can't avoid it while keeping the cache key nominal type sensitive
(not structurally sensitive).
0 commit comments