Avoid ObjC runtime warnings about duplicate class definitions for Serializer type #1444
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.
This is a workaround meant to avoid Objective-C runtime warnings about duplicate classes stemming from our internal
Serializertype which was added in #1390.Motivation:
In some usage scenarios there can be two or more copies of the testing library loaded into a runner process. When this happens on platforms such as Darwin which use the Objective-C runtime, this can cause duplicate class definition warnings logged to the console because class types and (non-generic) actor types are implemented within the Objective-C runtime as classes. This can look something like the following:
Modifications:
I considered several potential fixes, but decided the simplest and most likely to work in all usage scenarios is to make the
Serializertype generic by adding an unused generic type parameterT.Checklist: