BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
185 stars 59 forks source link

Create a non-generic Il2CppArrayBase class #126

Closed ds5678 closed 1 month ago

ds5678 commented 3 months ago

This will be important for unstripping ldlen.

ds5678 commented 3 months ago

Should Il2CppArrayBase<T>.WrapNativeGenericArrayPointer(IntPtr) become Il2CppArrayBase.WrapNativeGenericArrayPointer<T>(IntPtr)?

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1000

ds5678 commented 3 months ago

Should Il2CppArrayBase<T>.WrapNativeGenericArrayPointer(IntPtr) become Il2CppArrayBase.WrapNativeGenericArrayPointer<T>(IntPtr)?

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1000

Now that I think about it some more, this should be a future pull request because it has implications on the generator, which I significantly changed in #124.

ds5678 commented 3 months ago

Is Il2CppArrayBase or are classes inheriting it directly accessed by any plugin code? If yes, this looks like a binary compatibility break.

Plugins can and do access these classes.

My pull request has two breaking changes:

ds5678 commented 3 months ago

I'm not sure how much breaking changes matter because my ultimate goal is to make lots of breaking changes. I want to do a proper C# type system with real interfaces and virtual methods. Porting to AsmResolver is just a first step towards that goal.

ds5678 commented 1 month ago

The binary break can be avoided by adding a derived property that hides the base property.

Done