pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.22k stars 1.42k forks source link

Precondition: persistence keys must match value #3051

Closed stephencelis closed 4 months ago

stephencelis commented 4 months ago

We currently soft-fail if a persistence key is reused across different types. At runtime a persistence key will write over the other's value, and vice versa, and data is lost.

Reusing the same file storage URL or app storage key with conflicting types is a programmer error and ideally should crash over data corruption.