Skip to content

TinyStorage 2.0

Latest

Choose a tag to compare

@christianselig christianselig released this 16 Oct 01:34
· 3 commits to main since this release

TinyStorage 2.0 brings a bunch of awesome changes, improvements, and bug fixes, namely:

  • Fixed re-entrancy deadlock bug
  • Improved cross-process file modifications to be even more robust
  • SwiftUI integration changed/improved slightly, now only updates if the relevant key(s) changed
  • Added even more tests
  • Better Swift 6 concurrency annotations
  • Support for providing a custom logger
  • Concurrent dispatch queue so faster concurrent reads
  • No longer handles an unnecessary "file changed" event when the change occurred from the same process/instance
  • Bunch of other little bug fixes
  • Tests! (Thank you @donnywals)

Breaking changes:

  • Dropped macOS support due to more testing needing to be done around file protection (https://support.apple.com/my-mm/guide/security/secb010e978a/web)
  • If you were using retrieve in a SwiftUI view and relying on it to automatically update your view when the key's value changed, change to autoUpdatingRetrieve which will now have the bonus of only updating the SwiftUI view if the specific key you're retrieving changed (previously a change to any key would trigger a view update). As TinyStorage was changed to be explicitly nonisolated I wanted to have a separate function that updated SwiftUI through the main actor when changes occurred, and you can now use autoUpdatingRetrieve for that, or skip that tiny bit of overhead with retrieve if you're using it in a non-SwiftUI environment