Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use String(reflecting:) vs String(describing:) #391

Merged
merged 2 commits into from
Mar 20, 2021

Conversation

MaxDesiatov
Copy link
Collaborator

@MaxDesiatov MaxDesiatov commented Mar 17, 2021

Resolves #218.

String(describing:) initializer applied to metatypes does not include a module name, which can cause problems if two different types with same name come from different modules.

OTOH String(reflecting:) does include module name, which makes these reflection strings slightly longer, but should prevent obscure issues with name collisions from happening.

@MaxDesiatov MaxDesiatov requested a review from a team March 17, 2021 10:21
@MaxDesiatov MaxDesiatov added the bug Something isn't working label Mar 17, 2021
@MaxDesiatov MaxDesiatov merged commit bde7de9 into main Mar 20, 2021
@MaxDesiatov MaxDesiatov deleted the module-name-reflection branch March 20, 2021 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

Compare types by module name, not just type name in the reconciler
2 participants