Description
When using FileStorageKey<String>.Default, I’m seeing an issue where the file is created on disk with no contents, even though a default value is provided and used in memory. If I update that state the file then gets populated correctly.
Checklist
Expected behavior
FileStorageKey<T>.Default with a non-nil default value creates a file on disk with the contents of default value.
Actual behavior
FileStorageKey<T>.Default with a non-nil default value creates an empty file on disk.
Reproducing project
FileStorageRepro.zip
Sharing version information
2.5.2
Destination operating system
macOS 15.3.1
Xcode version information
16.2
Swift Compiler version information
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0
Description
When using
FileStorageKey<String>.Default, I’m seeing an issue where the file is created on disk with no contents, even though a default value is provided and used in memory. If I update that state the file then gets populated correctly.Checklist
mainbranch of this package.Expected behavior
FileStorageKey<T>.Defaultwith a non-nil default value creates a file on disk with the contents of default value.Actual behavior
FileStorageKey<T>.Defaultwith a non-nil default value creates an empty file on disk.Reproducing project
FileStorageRepro.zip
Sharing version information
2.5.2
Destination operating system
macOS 15.3.1
Xcode version information
16.2
Swift Compiler version information