RNET-1134: Add obfuscation attribute on generated RealmSchema #3594
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.
Description
I went through our reflection usages and it appears the unity initializer and RealmSchema are the low-hanging items here. There are a few more places where I'm not sure if we want to apply the obfuscation attribute:
realm-dotnet/Realm/Realm/Dynamic/MetaRealmObject.cs
Lines 40 to 54 in 93bbd4b
The problem here is that we'd need to annotate a bunch of properties/fields in the Realm assembly and with no actual tests, I can see this easily diverging over time.
realm-dotnet/Realm/Realm/Schema/RealmSchema.cs
Lines 52 to 54 in 93bbd4b
This is generated by the weaver, so it's a bit more annoying to add the attribute. Without it, we wouldn't get auto schema discovery on Unity though, so I'm tempted to just bite the bullet and add it.
Fixes #3574
TODO