Closed iKenndac closed 1 year ago
The failing tests on Linux are an existing issue where the Codable
roundtrip for Region
doesn't give a region object that is equal to the one prior to encoding (it's equivalent, but doesn't return true for ==
). I plan to look at this in due time.
Calendar
/NSCalendar
aren't thread-safe on Linux, which makes working withTime
a bit challenging on that platform - many non-mutating methods end up calling into Foundation code that makes temporary mutations during the call. This ends up manifesting as confusing crashes, such as:This PR adds
forcedCopy()
methods toRegion
andTimePeriod
(as well as documentation comments and a unit test), allowing clients to make thread-local deep copies of these objects in order to manually manage threading.