Return to reference type for config by unchecking Sendable conformance #206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I played around with different options, but all ideas I've had to resolve #192 and #201 included breaking changes that require documentation updates and users to update their code. After thinking about it again, I believe we should simply return to a reference type and mark the configuration file as
@unchecked Sendable
. This effectively turns off the compiler check for Sendable conformance and thread-safety. I think this is fine, firstly because we have our own synchronization mechanism inTelemetryManager
when accessing the configuration:Secondly, configuration changes are rare, so even if we didn't have any syncing logic, this shouldn't affect users in practical usage as concurrent changes to the configuration is unlikely to happen.
Fixes #192 and fixes #201.